Skip to main content

LeastSquaresSvd

Trait LeastSquaresSvd 

Source
pub trait LeastSquaresSvd<T> {
    // Required method
    fn least_squares<S: Data<Elem = T>>(
        &self,
        b: &ArrayBase<S, Ix1>,
    ) -> Result<LeastSquaresResult<T>>;
}
Expand description

The minimum-norm least-squares solution of A x ≈ b, robust to rank deficiency.

Overdetermined systems are first factorised by Householder QR with column pivoting; when that shows full column rank, the solution follows by back-substitution and the singular values from the eigenvalues of RᴴR. Rank-deficient and underdetermined systems use the SVD, which gives the minimum-norm solution.

Required Methods§

Source

fn least_squares<S: Data<Elem = T>>( &self, b: &ArrayBase<S, Ix1>, ) -> Result<LeastSquaresResult<T>>

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<T: Scalar, S: Data<Elem = T>> LeastSquaresSvd<T> for ArrayBase<S, Ix2>

Source§

fn least_squares<S2: Data<Elem = T>>( &self, b: &ArrayBase<S2, Ix1>, ) -> Result<LeastSquaresResult<T>>

Implementors§