LeastSquaresSvd

Trait LeastSquaresSvd 

Source
pub trait LeastSquaresSvd<E, I>
where E: Scalar + Lapack, I: Dimension,
{ // Required method fn least_squares( &self, rhs: &ArrayRef<E, I>, ) -> Result<LeastSquaresResult<E, I>>; }
Expand description

Solve least squares for immutable references

Required Methods§

Source

fn least_squares( &self, rhs: &ArrayRef<E, I>, ) -> Result<LeastSquaresResult<E, I>>

Solve a least squares problem of the form Ax = rhs by calling A.least_squares(&rhs). A and rhs are unchanged.

A and rhs must have the same layout, i.e. they must be both either row- or column-major format, otherwise a IncompatibleShape error is raised.

Implementations on Foreign Types§

Source§

impl<E> LeastSquaresSvd<E, Dim<[usize; 1]>> for ArrayRef<E, Ix2>
where E: Scalar + Lapack,

Solve least squares for immutable references and a single column vector as a right-hand side. E is one of f32, f64, c32, c64. D1, D2 can be any valid representation for ArrayBase (over E).

Source§

fn least_squares( &self, rhs: &ArrayRef<E, Ix1>, ) -> Result<LeastSquaresResult<E, Ix1>>

Solve a least squares problem of the form Ax = rhs by calling A.least_squares(&rhs), where rhs is a single column vector. A and rhs are unchanged.

A and rhs must have the same layout, i.e. they must be both either row- or column-major format, otherwise a IncompatibleShape error is raised.

Source§

impl<E> LeastSquaresSvd<E, Dim<[usize; 2]>> for ArrayRef<E, Ix2>
where E: Scalar + Lapack,

Solve least squares for immutable references and matrix (=mulitipe vectors) as a right-hand side. E is one of f32, f64, c32, c64. D1, D2 can be any valid representation for ArrayBase (over E).

Source§

fn least_squares( &self, rhs: &ArrayRef<E, Ix2>, ) -> Result<LeastSquaresResult<E, Ix2>>

Solve a least squares problem of the form Ax = rhs by calling A.least_squares(&rhs), where rhs is matrix. A and rhs are unchanged.

A and rhs must have the same layout, i.e. they must be both either row- or column-major format, otherwise a IncompatibleShape error is raised.

Implementors§