1854{
1855
1856
1857
1858
1859
1860
1861
1862
1864 if (P != nullptr)
1865 {
1869 {
1870 ERROR(
"expected matrices with the same number of rows");
1871 return nullptr;
1872 }
1873 for (unsigned int i = 0; i < vars->len; i++)
1874 if (vars->array[i] < 0 || vars->array[i] >= nvars)
1875 {
1876 ERROR(
"coeffs: expected a set of variable indices");
1877 return nullptr;
1878 }
1879
1880
1881
1882
1883
1884
1888 {
1889 vec v = monoms->
elem(i);
1890 if (v == nullptr)
1891 {
1892 ERROR(
"expected non-zero column");
1893 return nullptr;
1894 }
1895 ring_elem f = v->coeff;
1898
1899
1903 }
1904
1905
1906
1907
1909 for (
int i = 0; i <
n_cols(); i++)
1911
1912 return mat.to_matrix();
1913 }
1914 const M2FreeAlgebraOrQuotient* Q =
dynamic_cast<const M2FreeAlgebraOrQuotient*
>(
get_ring());
1915 if (Q != nullptr)
1916 {
1920 }
1921 ERROR(
"expected polynomial ring");
1922 return nullptr;
1923}
static const int nelements
virtual int n_vars() const =0
const Ring * get_ring() const
ring_elem elem(int i, int j) const
friend class MatrixConstructor
const FreeModule * rows() const
void to_expvector(const_monomial m, exponents_t result_exp) const
virtual const Monoid * getMonoid() const
virtual const_monomial lead_flat_monomial(const ring_elem f) const =0
virtual FreeModule * make_FreeModule() const
virtual const PolynomialRing * cast_to_PolynomialRing() const
exponent_table * exponent_table_new(int hint, int nvars)
long exponent_table_put(exponent_table *E, const exponent expon, long value)
const int * const_monomial
static void get_part_of_expvector(M2_arrayint vars, exponent big, int comp, exponent result)
static vec coeffs_of_vec(exponent_table *E, M2_arrayint vars, const FreeModule *F, vec f)
void NCMonomials(ModuleMonomialSet &H, const Matrix *M)
Matrix * NCCoefficientMatrix(ModuleMonomialSet &H, const Matrix *M)
IntsSet< ModuleMonomDefaultConfig > ModuleMonomialSet
#define newarray_atomic(T, len)