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

◆ QR()

template<typename T>
bool MutableMat< T >::QR ( MutableMatrix * Q,
MutableMatrix * R,
bool return_QR ) const
virtual

Implements MutableMatrix.

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

325{
326 if (!is_dense())
327 throw exc::engine_error("'QR' is only implemented for dense matrices");
328
329 auto Q1 = Q->coerce<DMat<CoeffRing> >();
330 if (Q1 == 0) throw exc::engine_error("Q matrix is of the wrong type/ring");
331 auto R1 = R->coerce<DMat<CoeffRing> >();
332 if (R1 == 0) throw exc::engine_error("R matrix is of the wrong type/ring");
333 return MatrixOps::QR(mat, *Q1, *R1, return_QR);
334}
virtual bool is_dense() const
MatT * coerce()
Definition mat.hpp:151
bool QR(const Mat &A, Mat2 &Q, Mat3 &R, bool return_QR)

References MutableMatrix::coerce(), is_dense(), mat, MutableMatrix::MutableMatrix(), and MatrixOps::QR().