newton_method

Function newton_method 

Source
pub fn newton_method<F, Func>(
    f: &Func,
    x0: ArrayView1<'_, F>,
    tol: F,
    max_iter: usize,
) -> (Array1<F>, bool)
where F: IntegrateFloat, Func: Fn(ArrayView1<'_, F>) -> Array1<F>,
Expand description

Newton method for solving a system of nonlinear equations

§Arguments

  • f - The function representing the system of equations
  • x0 - Initial guess
  • tol - Tolerance for convergence
  • max_iter - Maximum number of iterations

§Returns

  • The solution vector and a bool indicating whether it converged