28 typedef vector<Exponent*>
Cont;
32 Ideal(
size_t varCount = 0);
199 void print(FILE* file)
const;
200 void print(ostream& out)
const;
280 template<
class Predicate>
296 void reset(
size_t newVarCount);
320 template<
class Predicate>
324 if (newEnd !=
_terms.end()) {
ostream & operator<<(ostream &out, const Ideal &ideal)
Exponent * _chunkIterator
void reset(size_t newVarCount)
void swap(ExponentAllocator &allocator)
ExponentAllocator & operator=(const ExponentAllocator &)
vector< Exponent * > _chunks
bool useSingleChunking() const
ExponentAllocator(const ExponentAllocator &)
ExponentAllocator(size_t varCount)
Represents a monomial ideal with int exponents.
void getGcdOfMultiplesOf(Exponent *gcd, const Exponent *divisor)
Sets gcd to the greatest common divisor of those generators that are divisible by divisor.
void removeStrictMultiples(const Exponent *term)
const Exponent * operator[](size_t index) const
void singleDegreeSort(size_t var)
bool isSquareFree() const
Cont::const_reverse_iterator const_reverse_iterator
void product(const Exponent *term)
void remove(const_iterator it)
void getGcd(Exponent *gcd) const
Sets gcd to the greatest common divisor of all generators.
vector< Exponent * > Cont
void insertNonMultiples(const Exponent *term, const Ideal &ideal)
size_t getGeneratorCount() const
ExponentAllocator _allocator
size_t getMostNonGenericExponent(size_t &var, Exponent &exp)
Sets var and exp such that var^exp is the most non-generic degree.
const_iterator getMultiple(size_t var) const
bool containsIdentity() const
void colon(const Exponent *by)
void clearAndSetVarCount(size_t varCount)
void getLcm(Exponent *lcm) const
Sets lcm to the least common multiple of all generators.
void takeRadicalNoMinimize()
Replaces all generators with their support and does not remove any non-minimal generators this may pr...
bool getNonGenericExponent(size_t &var, Exponent &exp)
Sets var and exp such that var^exp is some non-generic degree.
bool isIncomparable(const Exponent *term) const
Cont::const_iterator const_iterator
static void clearStaticCache()
Ideal caches memory allocated with new internally and reuses it to avoid calling new all the time.
vector< Exponent * > _terms
void mapExponentsToZeroNoMinimize(const Term &zeroExponents)
Replaces the exponents from zeroExponents with zero and does not remove any non-minimal generators th...
bool contains(const Exponent *term) const
size_t getTypicalExponent(size_t &var, Exponent &exp)
Sets var and exp such that var^exp is the typical non-zero exponent.
void insert(const Exponent *term)
bool strictlyContains(const Exponent *term) const
void insertReminimize(const Exponent *term)
void getLeastExponents(Exponent *least) const
bool disjointSupport() const
Returns true if all pairs of generators have disjoint support.
const_iterator end() const
Ideal & operator=(const Ideal &ideal)
bool removeIf(Predicate pred)
Removes those generators m such that pred(m) evaluates to true.
void print(FILE *file) const
Exponent *& operator[](size_t index)
const_iterator begin() const
void getSupportCounts(Exponent *counts) const
counts[var] will be the number of generators divisible by var.
Ideal(size_t varCount=0)
Initialize this object to the zero ideal in varCount variables.
bool isIrreducible() const
void removeMultiples(const Exponent *term)
Cont::reverse_iterator reverse_iterator
bool isWeaklyGeneric() const
size_t getTypicalNonGenericExponent(size_t &var, Exponent &exp)
Sets var and exp such that var^exp is the typical non-generic degree.
bool colonReminimize(const Exponent *colon)
bool isMinimallyGenerated() const
void getGcdAtExponent(Exponent *gcd, size_t var, Exponent exp)
Sets gcd to the greatest common divisor of those generators that raise the variable var to the power ...
bool operator==(const Ideal &ideal) const
Rereturns true if *this equals ideal.
size_t getVarCount() const
Term represents a product of variables which does not include a coefficient.
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)