Macaulay2 Engine
Loading...
Searching...
No Matches

◆ least_squares()

template<typename T>
bool MutableMat< T >::least_squares ( const MutableMatrix * b,
MutableMatrix * x,
bool assume_full_rank ) const
virtual

Implements MutableMatrix.

Definition at line 311 of file mutablemat-imp.hpp.

314{
315 const T* B1 = B->coerce_const<T>();
316 T* X1 = X->coerce<T>();
317 if (B1 == 0 or X1 == 0)
318 throw exc::engine_error("expected matrices of the same type");
320 return retval;
321}
MatT * coerce()
Definition mat.hpp:151
const MatT * coerce_const() const
Definition mat.hpp:159
bool leastSquares(const Mat &A, const Mat &B, Mat &X, bool assume_full_rank)

References MutableMatrix::coerce(), MutableMatrix::coerce_const(), MatrixOps::leastSquares(), mat, MutableMatrix::MutableMatrix(), and T.