31 const list<Monomial> & T,
const WT_TYPE * grading
33 map<DEG_TYPE, unsigned long> result;
37 list<pair<Monomial, Monomial>> S;
38 for (
auto ti = T.begin(); ti != Tstop; ++ti) {
39 S.emplace_back(*ti, u);
41 for (
auto ui = T.begin(); ui != ti; ++ui) {
42 S.emplace_back(*ti, *ui);
46 list<pair<Monomial, Monomial>> S2;
50 not found and u | p.first.
lcm(p.second) and
51 any_of(S2.begin(), S2.end(), [p,u](pair<Monomial, Monomial> q){
return (q.first == u or q.second == u) and (q.first == p.first or q.second==p.first);}) and
52 any_of(S2.begin(), S2.end(), [p,u](pair<Monomial, Monomial> q){
return (q.first == u or q.second == u) and (q.first == p.second or q.second==p.second);})
59 t | p.first.lcm(p.second) and
60 any_of(S2.begin(), S2.end(), [p,t](pair<Monomial, Monomial> q){
return (q.first == t or q.second == t) and (q.first == p.second or q.second==p.second);}) and
61 any_of(S2.begin(), S2.end(), [p,t](pair<Monomial, Monomial> q){
return (q.first == t or q.second == t) and (q.first == p.second or q.second==p.second);})
66 if (not found) S2.emplace_back(p);
69 DEG_TYPE d = (grading ==
nullptr)
70 ? p.first.lcm(p.second).total_degree()
71 : p.first.lcm(p.second).weighted_degree(grading);
72 if (result.find(d) != result.end())
void set_monomial_ordering(const Monomial_Ordering *mord)
sets the Monomial_Ordering associated with this Monomial
map< DEG_TYPE, unsigned long > incremental_betti(const list< Monomial > &T, const WT_TYPE *grading)
Incremental Betti numbers for monomial ideals.
Implementation of monomials.
Monomial lcm(const Monomial &u) const
Least common multiple: largest exponents.
const Monomial_Ordering * monomial_ordering() const
the Monomial_Ordering associated with this Monomial