12 return new MarkedGB(originalR0, F0, Fsyz0);
42 :
R(R0),
F(F0),
gb(gb0)
49 return R->gbvector_compare(
F,
x, y) ==
LT;
75 for (
int i = 0; i < leadterms0.size(); i++)
83 h.
f =
R->gbvector_copy(f);
84 h.
fsyz =
R->gbvector_copy(polys0[i].fsyz);
95 ERROR(
"lead term does not appear in the polynomial!");
101 R->gbvector_get_lead_exponents(
F, iinf, e);
107 R->gbvector_remove_content(h.
f, h.
fsyz);
109 T->insert(e, iinf->
comp, i);
122 for (
int i = 0; i < polys.size(); i++)
137 frem->
next =
nullptr;
141 while (!
R->gbvector_is_zero(h.
f))
143 if (h.
f != marked_lead_term)
145 R->gbvector_get_lead_exponents(
F, h.
f, EXP);
147 int w =
T->find_divisor(EXP,
x);
151 R->gbvector_reduce_with_marked_lead_term(
F,
167 frem->
next =
nullptr;
173 R->gbvector_sort(
F, f.
f);
188 frem->
next =
nullptr;
192 while (!
R->gbvector_is_zero(h))
194 R->gbvector_get_lead_exponents(
F, h, EXP);
196 int w =
T->find_divisor(EXP,
x);
202 frem->
next =
nullptr;
207 R->gbvector_reduce_with_marked_lead_term(
F,
221 R->gbvector_sort(
F, f);
230 frem->
next =
nullptr;
240 R->gbvector_get_lead_exponents(
F, lead, EXP);
242 int w =
T->find_divisor(EXP,
x);
247 frem->
next =
nullptr;
252 R->reduce_marked_lead_term_heap(
257 R->gbvector_sort(
F, f);
264 ERROR(
"Cannot determine given initial monomials");
268 for (
int i = 0; i < polys.size(); i++)
279 for (
int i = 0; i < polys.size(); i++)
282 R->gbvector_parallel_lead_terms(w,
F,
leadterms[i], polys[i].f);
exponents::Exponents exponents_t
Engine-side free module R^n over a Ring.
Polynomial-ring view tuned for the inner loop of classical Buchberger Groebner-basis computations.
virtual void add_marked_elems(const VECTOR(gbvector *) &leadterms, const VECTOR(POLY) &polys0, bool auto_reduced)
virtual void set_gb(VECTOR(POLY) &polys0)
virtual void remainder(POLY &f, bool use_denom, ring_elem &denom)
virtual const Matrix * get_parallel_lead_terms(M2_arrayint w)
MarkedGB(const PolynomialRing *originalR0, const FreeModule *F0, const FreeModule *Fsyz0)
friend ReducedGB * ReducedGB::create(const PolynomialRing *originalR0, const FreeModule *F0, const FreeModule *Fsyz0, const GBWeight *wt0)
void geo_remainder(gbvector *&f, bool use_denom, ring_elem &denom)
virtual const Matrix * get_initial(int nparts)
const GBRing * get_gb_ring() const
void marked_remainder(POLY &f, bool use_denom, ring_elem &denom, gbvector *marked_lead_term)
Mutable builder used to assemble an immutable Matrix one column (or one term) at a time.
int compare(int nslots, const_monomial m, const_monomial n) const
Engine-side commutative monomial monoid: variable names, ordering, multidegree machinery,...
static MonomialTable * make(int nvars)
Abstract base for the engine's polynomial-ring hierarchy.
const PolynomialRing * originalR
ReducedGB(GBRing *R0, const PolynomialRing *originalR0, const FreeModule *F0, const FreeModule *Fsyz0)
gbvector * remove_lead_term()
const gbvector * get_lead_term()
void gb(IntermediateBasis &F, int n)
MatrixConstructor — the mutable builder that produces an immutable Matrix.
MonomialIdeal — exponent-vector-only representation of an ideal generated by monomials.
#define ALLOCATE_EXPONENTS(byte_len)
bool operator()(int xx, int yy)
MarkedGB_sorter(GBRing *R0, const FreeModule *F0, const VECTOR(POLY) &gb0)