329{
330 try
331 {
332 unsigned int n = Ms->len;
333 if (n == 0)
334 {
335 ERROR(
"matrix concat: expects at least one matrix");
336 return nullptr;
337 }
341 int next = 0;
342 for (unsigned int i = 0; i < n; i++)
343 {
344 const Matrix *M = Ms->array[i];
346 {
347 ERROR(
"matrix concat: different base rings");
348 return nullptr;
349 }
351 {
352 ERROR(
"matrix concat: row sizes are not equal");
353 return nullptr;
354 }
355 for (
int j = 0; j < M->
n_cols(); j++)
356 {
358 mat.set_column_degree(next++, M->
cols()->
degree(j));
359 }
360 }
361 return mat.to_matrix();
363 {
365 return nullptr;
366 }
367}
const Ring * get_ring() const
const_monomial degree(int i) const
Engine-side free module R^n over a Ring.
const Ring * get_ring() const
ring_elem elem(int i, int j) const
const FreeModule * cols() const
Mutable builder used to assemble an immutable Matrix one column (or one term) at a time.
vec copy_vec(const vecterm *v) const