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

◆ IM2_MutableMatrix_row_swap()

M2_bool IM2_MutableMatrix_row_swap ( MutableMatrix * M,
int i,
int j )

Definition at line 273 of file mutable-matrix.cpp.

275{
276 if (i < 0 || j < 0 || i >= M->n_rows() || j >= M->n_rows())
277 {
278 ERROR("row index out of range");
279 return 0;
280 }
281
282 M->interchange_rows(i, j);
283 return 1;
284}
virtual size_t n_rows() const =0
virtual bool interchange_rows(size_t i, size_t j)=0
const int ERROR
Definition m2-mem.cpp:55

References ERROR, MutableMatrix::interchange_rows(), and MutableMatrix::n_rows().