Function ls_solver::api::compute_precision
source · pub fn compute_precision(
a: &CsrMatrix<f64>,
solution: &DVector<f64>,
method: Method,
tol: f64,
max_iter: i32,
omega: f64
) -> Performance
Expand description
Determines the accuracy of x (solution computed by the routine) against the correct one and returns an istance of Performance.
Where x is the solution of the system ax = b, with b := a*solution.
Arguments:
- a: matrix
- solution: the given solution of the system
- method: an istance of the enum Method
- tol: the tolerance required to stop the routine
- max_iter: the maximum number of iteration after wich the routine stops
- omega: the relaxation factor, used only if method is either Jacobi or Gauss-Seidel