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

◆ subtractMultipleTo()

template<typename T>
void MutableMat< T >::subtractMultipleTo ( const MutableMatrix * A,
const MutableMatrix * B )
virtual

Implements MutableMatrix.

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

199{
200 // First: make sure that A, B have the right ring/matrix type
201 const T* A1 = A->coerce_const<T>();
202 const T* B1 = B->coerce_const<T>();
203 if (A1 == 0 or B1 == 0)
204 throw exc::engine_error(
205 "mutable matrix/ring type for (mutable) matrix multiplication required "
206 "to be the same");
207 if (mat.numRows() != A1->numRows() or mat.numColumns() != B1->numColumns())
208 throw exc::engine_error(
209 "expected matrix sizes to be compatible with matrix multiplication");
211}
const MatT * coerce_const() const
Definition mat.hpp:159
void subtractMultipleTo(DMatZZpFFPACK &C, const DMatZZpFFPACK &A, const DMatZZpFFPACK &B)
Definition dmat.cpp:63

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