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

◆ addMultipleTo()

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

Implements MutableMatrix.

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

182{
183 // First: make sure that A, B have the right ring/matrix type
184 const T* A1 = A->coerce_const<T>();
185 const T* B1 = B->coerce_const<T>();
186 if (A1 == 0 or B1 == 0)
187 throw exc::engine_error(
188 "mutable matrix/ring type for (mutable) matrix multiplication required "
189 "to be the same");
190 if (mat.numRows() != A1->numRows() or mat.numColumns() != B1->numColumns())
191 throw exc::engine_error(
192 "expected matrix sizes to be compatible with matrix multiplication");
194}
const MatT * coerce_const() const
Definition mat.hpp:159
void addMultipleTo(DMatZZpFFPACK &C, const DMatZZpFFPACK::ElementType &a, const DMatZZpFFPACK &A, const DMatZZpFFPACK &B)
Definition dmat.cpp:13

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