Skip to main content

NormalEquations

Trait NormalEquations 

Source
pub trait NormalEquations {
    // Required methods
    fn residual(&mut self, x: &[f64]) -> Vec<f64>;
    fn normal(
        &mut self,
        x: &[f64],
        f: &[f64],
    ) -> Result<(Mat<f64>, Vec<f64>), DspError>;
}
Expand description

Supplies the residual and the normal equations of a least-squares problem.

Required Methods§

Source

fn residual(&mut self, x: &[f64]) -> Vec<f64>

Residual f(x), counted in nfev like SciPy’s fun.

Source

fn normal( &mut self, x: &[f64], f: &[f64], ) -> Result<(Mat<f64>, Vec<f64>), DspError>

JᵀJ (n-by-n, both triangles filled) and Jᵀf at x, using the residual just returned for the same x. Counted in njev like SciPy’s jac.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§