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

◆ leastSquares() [3/5]

bool MatrixOps::leastSquares ( const DMatRR & A,
const DMatRR & B,
DMatRR & X,
bool assume_full_rank )
inline

Definition at line 1240 of file mat-linalg.hpp.

1244{
1245#ifndef NO_LAPACK
1246 if (assume_full_rank)
1247 return Lapack::least_squares(&A, &B, &X);
1248 else
1249 return Lapack::least_squares_deficient(&A, &B, &X);
1250#else
1251 // place eigen code here
1252 return EigenM2::least_squares(&A, &B, &X);
1253 // throw exc::engine_error( "not implemented!!!");
1254 // return false; // indicates error
1255#endif
1256}
static bool least_squares_deficient(const DMatRRR *A, const DMatRRR *b, DMatRRR *x)
static bool least_squares(const DMatRRR *A, const DMatRRR *b, DMatRRR *x)
bool least_squares(const LMatrixRRR *A, const LMatrixRRR *B, LMatrixRRR *X)
Definition eigen.cpp:558

References EigenM2::least_squares(), Lapack::least_squares(), and Lapack::least_squares_deficient().