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

◆ set()

template<typename RT>
void MatrixOps::set ( DMat< RT > & A,
MatrixWindow wA,
const DMat< RT > & B,
MatrixWindow wB )

Definition at line 309 of file mat-arith.hpp.

310{
311 assert(wA.sameSize(wB));
312 long rA = wA.begin_row;
313 long rB = wB.begin_row;
314 for (; rA < wA.end_row; ++rA, ++rB)
315 {
316 long cA = wA.begin_column;
317 long cB = wB.begin_column;
318 for (; cA < wA.end_column; ++cA, ++cB)
319 A.ring().set(A.entry(rA, cA), B.entry(rB, cB));
320 }
321}
ElementType & entry(size_t row, size_t column)
Definition dmat.hpp:148
const ACoeffRing & ring() const
Definition dmat.hpp:143
bool sameSize(const MatrixWindow &b) const
Definition mat-arith.hpp:73
long begin_column
Definition mat-arith.hpp:64

References MatrixWindow::begin_column, MatrixWindow::begin_row, MatrixWindow::end_column, MatrixWindow::end_row, DMat< ACoeffRing >::entry(), DMat< ACoeffRing >::ring(), and MatrixWindow::sameSize().