Definition at line 60 of file matrix.cpp.
63{
64
65
66
68
69 if (M != nullptr)
70 for (unsigned int i = 0; i < M->len; i++)
71 {
72 if (R != M->array[i]->get_ring())
73 {
74 ERROR(
"expected vectors in the same ring");
75 return nullptr;
76 }
77 }
78
80 if (M != nullptr)
81 {
82 unsigned int next = 0;
83 for (
int r = 0; r < target->
rank(); r++)
84 for (int c = 0; c < ncols && next < M->len; c++)
85 {
86 mat.set_entry(r, c, M->array[next]->get_value());
87 next++;
88 }
89 mat.compute_column_degrees();
90 }
91 return mat.to_matrix();
92}
const Ring * get_ring() const
friend class MatrixConstructor
References MatrixConstructor::compute_column_degrees(), ERROR, FreeModule, FreeModule::get_ring(), make(), Matrix(), MatrixConstructor, FreeModule::rank(), MatrixConstructor::set_entry(), and MatrixConstructor::to_matrix().
Referenced by make(), make(), make(), and MatrixConstructor.