193{
194 int nrows =
static_cast<int>(A.
numRows());
198 if (nrows == 0 || ncols == 0)
return result.to_matrix();
201 for (int c = 0; c < ncols; c++)
202 {
204 for (i.set(c); i.valid(); i.next())
205 {
206 i.copy_elem(a);
207 int r = static_cast<int>(i.row());
208 result.set_entry(r, c, a);
209 }
210 }
211 result.compute_column_degrees();
212 return result.to_matrix();
213}
Engine-side free module R^n over a Ring.
Mutable builder used to assemble an immutable Matrix one column (or one term) at a time.
virtual FreeModule * make_FreeModule() const
size_t numColumns() const
VALGRIND_MAKE_MEM_DEFINED & result(result)