Definition at line 1639 of file matrix.cpp.
1640{
1642 if (Q == nullptr)
1643 {
1644 ERROR(
"expected NC polynomial algebra");
1645 return nullptr;
1646 }
1647
1648
1649
1651 for (
int c = 0; c < M->
n_cols(); c++)
1652 {
1654 for (; v != nullptr; v = v->next)
1655 {
1656 int comp = v->comp;
1657 auto f = Q->
toPoly(v->coeff);
1658 for (auto i = f->cbegin(); i != f->cend(); ++i)
1659 {
1662 {
1664 mat.set_entry(
result.first, c, cf);
1665 }
1666 }
1667 }
1668 }
1669 return mat.to_matrix();
1670}
std::pair< int, bool > find(Monom m, int comp)
virtual ring_elem from_coefficient(const ring_elem a) const =0
const Poly * toPoly(const ring_elem f) const
Abstract Ring subclass that lifts either a FreeAlgebra or a FreeAlgebraQuotient into the engine's Rin...
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.
virtual FreeModule * make_FreeModule() const
VALGRIND_MAKE_MEM_DEFINED & result(result)
References Matrix::cols(), Matrix::elem(), ERROR, IntsSet< Configuration >::find(), M2FreeAlgebraOrQuotient::from_coefficient(), Matrix::get_ring(), Ring::make_FreeModule(), Matrix, Matrix::n_cols(), result(), MatrixConstructor::set_entry(), IntsSet< Configuration >::size(), MatrixConstructor::to_matrix(), and M2FreeAlgebraOrQuotient::toPoly().
Referenced by Matrix::coeffs().