46 for (
int i = 0; i < polys.size(); i++)
48 R->gbvector_remove(polys[i].f);
49 R->gbvector_remove(polys[i].fsyz);
56 for (
VECTOR(
POLY)::const_iterator i = polys.begin(); i != polys.end(); i++)
58 vec v =
originalR->translate_gbvector_to_vec(
F, (*i).f);
83 for (
VECTOR(
POLY)::const_iterator i = polys.begin(); i != polys.end(); i++)
85 vec v =
originalR->translate_gbvector_to_vec(
Fsyz, (*i).fsyz);
94 for (
VECTOR(
POLY)::const_iterator i = polys.begin(); i != polys.end(); i++)
96 gbvector *f =
R->gbvector_lead_term(nparts,
F, (*i).f);
98 R->gbvector_remove(f);
106 for (
int i = 0; i < polys.size(); i++)
109 R->gbvector_parallel_lead_terms(w,
F, polys[i].f, polys[i].f);
111 R->gbvector_remove(f);
118 for (
unsigned int i = 0; i < polys.size(); i++)
121 R->gbvector_text_out(o,
F, polys[i].f);
130 ERROR(
"expected matrix over the same ring");
136 ERROR(
"expected matrices to have same number of rows");
141 for (
int i = 0; i < m->
n_cols(); i++)
148 vec fv =
originalR->translate_gbvector_to_vec_denom(
F, g, denom);
150 R->gbvector_remove(g);
156 const Matrix **result_remainder,
157 const Matrix **result_quotient)
161 ERROR(
"expected matrix over the same ring");
162 *result_remainder =
nullptr;
163 *result_quotient =
nullptr;
168 ERROR(
"expected matrices to have same number of rows");
169 *result_remainder =
nullptr;
170 *result_quotient =
nullptr;
178#warning "K should be the denominator ring?"
180 const Ring *K =
R->get_flattened_coefficients();
181 bool all_zeroes =
true;
182 for (
int i = 0; i < m->
n_cols(); i++)
186 g.
f =
originalR->translate_gbvector_from_vec(
F, (*m)[i], denom);
187 g.
fsyz =
R->gbvector_zero();
190 if (g.
f !=
nullptr) all_zeroes =
false;
192 vec fv =
originalR->translate_gbvector_to_vec_denom(
F, g.
f, denom);
199 R->gbvector_remove(g.
f);
200 R->gbvector_remove(g.
fsyz);
202 *result_remainder = mat_remainder.
to_matrix();
203 *result_quotient = mat_quotient.
to_matrix();
212 ERROR(
"expected matrix over the same ring");
216 for (
int i = 0; i < m->
n_cols(); i++)
225 R->gbvector_remove(g);
enum ComputationStatusCode set_status(enum ComputationStatusCode)
Engine-side free module R^n over a Ring.
Polynomial-ring view tuned for the inner loop of classical Buchberger Groebner-basis computations.
Heuristic-weight evaluator for gbvectors, used during Groebner basis computation to drive the S-pair ...
const_monomial degree_shift() const
const Ring * get_ring() const
const FreeModule * rows() const
const FreeModule * cols() const
void set_column(int c, vec v)
Mutable builder used to assemble an immutable Matrix one column (or one term) at a time.
int numNonTermOrderVariables() const
virtual GBRing * get_gb_ring() const
virtual const Monoid * getMonoid() const
CoefficientType coefficient_type() const
Abstract base for the engine's polynomial-ring hierarchy.
Computation of a reduced GB w.r.t. a local order, over a field.
Computation of a reduced GB w.r.t. a term order, over a field.
Computation of a reduced GB w.r.t. a term order, over ZZ.
virtual const Matrix * matrix_remainder(const Matrix *m)
virtual const Matrix * get_change()
virtual const Matrix * get_mingens()
virtual const Matrix * get_syzygies()
virtual void text_out(buffer &o) const
virtual const Matrix * get_initial(int nparts)
virtual const Matrix * get_parallel_lead_terms(M2_arrayint w)
virtual void remainder(POLY &f, bool use_denom, ring_elem &denom)=0
virtual int contains(const Matrix *m)
static ReducedGB * create(const PolynomialRing *originalR0, const FreeModule *F0, const FreeModule *Fsyz0, const GBWeight *wt0=nullptr)
virtual const Matrix * get_gb()
const PolynomialRing * originalR
virtual M2_bool matrix_lift(const Matrix *m, const Matrix **result_remainder, const Matrix **result_quotient)
ReducedGB(GBRing *R0, const PolynomialRing *originalR0, const FreeModule *F0, const FreeModule *Fsyz0)
void negate_to(ring_elem &f) const
MatrixConstructor — the mutable builder that produces an immutable Matrix.
Matrix — the engine's immutable homomorphism F -> G between free modules.
PolynomialRing — abstract polynomial-ring base, the engine's most-reused class.
ReducedGB — abstract base for the canonicalising reduction pass that follows GB computation.