pub trait LeastSquaresSvdInto<D, E, I>{
// Required method
fn least_squares_into(
self,
rhs: ArrayBase<D, I>,
) -> Result<LeastSquaresResult<E, I>>;
}
Expand description
Solve least squares for owned matrices
Required Methods§
sourcefn least_squares_into(
self,
rhs: ArrayBase<D, I>,
) -> Result<LeastSquaresResult<E, I>>
fn least_squares_into( self, rhs: ArrayBase<D, I>, ) -> Result<LeastSquaresResult<E, I>>
Solve a least squares problem of the form Ax = rhs
by calling A.least_squares(rhs)
, consuming both A
and rhs
. This uses the memory location of A
and
rhs
, which avoids some extra memory allocations.
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, D1, D2> LeastSquaresSvdInto<D2, E, Dim<[usize; 1]>> for ArrayBase<D1, Ix2>
impl<E, D1, D2> LeastSquaresSvdInto<D2, E, Dim<[usize; 1]>> for ArrayBase<D1, Ix2>
Solve least squares for owned values and a single column vector as a right-hand side. The matrix and the RHS vector are consumed.
E
is one of f32
, f64
, c32
, c64
. D
can be any
valid representation for ArrayBase
.
source§fn least_squares_into(
self,
rhs: ArrayBase<D2, Ix1>,
) -> Result<LeastSquaresResult<E, Ix1>>
fn least_squares_into( self, rhs: ArrayBase<D2, 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 consumed.
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, D1, D2> LeastSquaresSvdInto<D2, E, Dim<[usize; 2]>> for ArrayBase<D1, Ix2>
impl<E, D1, D2> LeastSquaresSvdInto<D2, E, Dim<[usize; 2]>> for ArrayBase<D1, Ix2>
Solve least squares for owned values and a matrix as a right-hand side. The matrix and the RHS matrix are consumed.
E
is one of f32
, f64
, c32
, c64
. D1
, D2
can be any
valid representation for ArrayBase
(over E
).
source§fn least_squares_into(
self,
rhs: ArrayBase<D2, Ix2>,
) -> Result<LeastSquaresResult<E, Ix2>>
fn least_squares_into( self, rhs: ArrayBase<D2, Ix2>, ) -> Result<LeastSquaresResult<E, Ix2>>
Solve a least squares problem of the form Ax = rhs
by calling A.least_squares(rhs)
, where rhs
is a
matrix. A
and rhs
are consumed.
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.