26 const size_t MaxLeafSize = 60;
32 for (; begin != end; ++begin)
63 if ((
size_t)distance(
_begin,
_end) <= MaxLeafSize)
75 for (
size_t var = 1; var <
_varCount; ++var)
95 while (left != right) {
97 while ((*left)[
_var] <=
_pivot && left != right)
101 while ((*right)[
_var] >
_pivot && left != right)
135 if (_lessOrEqual.get() != 0) {
136 ASSERT(_greater.get() != 0);
138 _lessOrEqual->strictlyContains(term) ||
139 _greater->strictlyContains(term);
140 ASSERT(returnValue == rawStrictlyDivides(_begin, _end, term, _varCount));
143 ASSERT(_greater.get() == 0);
144 return rawStrictlyDivides(_begin, _end, term, _varCount);
163 return _root->strictlyContains(term);
168 return _root->getVarCount();
bool strictlyContains(const Exponent *term) const
size_t getVarCount() const
auto_ptr< Node > _lessOrEqual
auto_ptr< Node > _greater
Node(Ideal::iterator begin, Ideal::iterator end, size_t varCount)
IdealTree(const Ideal &ideal)
auto_ptr< Ideal > _storage
bool strictlyContains(const Exponent *term) const
size_t getVarCount() const
Represents a monomial ideal with int exponents.
Cont::const_iterator const_iterator
size_t getVarCount() const
Term represents a product of variables which does not include a coefficient.
static bool strictlyDivides(const Exponent *a, const Exponent *b, size_t varCount)
Returns whether a strictly divides b.
void lcm(Word *res, const Word *resEnd, const Word *a, const Word *b)
void gcd(Word *res, const Word *resEnd, const Word *a, const Word *b)
void swap(hashtable< _Val, _Key, _HF, _Extract, _EqKey, _All > &__ht1, hashtable< _Val, _Key, _HF, _Extract, _EqKey, _All > &__ht2)