Skip to main content

newton_system

Function newton_system 

Source
pub fn newton_system<F, J>(
    f: F,
    jacobian: Option<J>,
    x0: Vec<f64>,
    options: SystemOptions,
) -> Result<SystemRootResult, ErrorsJSL>
where F: Fn(&[f64]) -> Vec<f64>, J: Fn(&[f64]) -> Vec<Vec<f64>>,
Expand description

Globally convergent Newton’s method for F(x) = 0 from x0. jacobian(x) returns the rows ∂Fᵢ/∂xⱼ; with jacobian = None the Jacobian is formed by forward differences. Errors for an empty x0 or mismatched dimensions; a singular Jacobian ends the iteration unconverged.