|
Frobby 0.10.0
|
Represents a monomial ideal with int exponents. More...
#include <Ideal.h>

Classes | |
| class | ExponentAllocator |
Public Types | |
| typedef Cont::const_iterator | const_iterator |
| typedef Cont::iterator | iterator |
| typedef Cont::const_reverse_iterator | const_reverse_iterator |
| typedef Cont::reverse_iterator | reverse_iterator |
Public Member Functions | |
| Ideal (size_t varCount=0) | |
| Ideal (const Term &term) | |
| Ideal (const Ideal &ideal) | |
| const_iterator | begin () const |
| const_iterator | end () const |
| const Exponent * | operator[] (size_t index) const |
| iterator | begin () |
| iterator | end () |
| Exponent *& | operator[] (size_t index) |
| size_t | getVarCount () const |
| size_t | getGeneratorCount () const |
| bool | isIncomparable (const Exponent *term) const |
| bool | contains (const Exponent *term) const |
| bool | containsIdentity () const |
| bool | strictlyContains (const Exponent *term) const |
| bool | isMinimallyGenerated () const |
| bool | isZeroIdeal () const |
| bool | isIrreducible () const |
| bool | isSquareFree () const |
| bool | isStronglyGeneric () |
| bool | isWeaklyGeneric () const |
| bool | disjointSupport () const |
| void | getLcm (Exponent *lcm) const |
| void | getGcd (Exponent *gcd) const |
| void | getGcdAtExponent (Exponent *gcd, size_t var, Exponent exp) |
| void | getGcdOfMultiplesOf (Exponent *gcd, const Exponent *divisor) |
| void | getLeastExponents (Exponent *least) const |
| void | getSupportCounts (Exponent *counts) const |
| size_t | getTypicalExponent (size_t &var, Exponent &exp) |
| size_t | getMostNonGenericExponent (size_t &var, Exponent &exp) |
| size_t | getTypicalNonGenericExponent (size_t &var, Exponent &exp) |
| bool | getNonGenericExponent (size_t &var, Exponent &exp) |
| const_iterator | getMultiple (size_t var) const |
| bool | operator== (const Ideal &ideal) const |
| void | print (FILE *file) const |
| void | print (ostream &out) const |
| void | insert (const Exponent *term) |
| void | insert (const Ideal &ideal) |
| void | insert (size_t var, Exponent e) |
| void | insertReminimize (const Exponent *term) |
| void | insertReminimize (size_t var, Exponent e) |
| void | minimize () |
| void | sortReverseLex () |
| void | sortLex () |
| void | singleDegreeSort (size_t var) |
| void | product (const Exponent *term) |
| void | colon (const Exponent *by) |
| void | colon (size_t var, Exponent e) |
| bool | colonReminimize (const Exponent *colon) |
| bool | colonReminimize (size_t var, Exponent e) |
| void | remove (const_iterator it) |
| void | removeMultiples (const Exponent *term) |
| void | removeMultiples (size_t var, Exponent e) |
| void | insertNonMultiples (const Exponent *term, const Ideal &ideal) |
| void | insertNonMultiples (size_t var, Exponent e, const Ideal &ideal) |
| void | removeStrictMultiples (const Exponent *term) |
| void | removeDuplicates () |
| void | clear () |
| void | clearAndSetVarCount (size_t varCount) |
| void | mapExponentsToZeroNoMinimize (const Term &zeroExponents) |
| void | takeRadicalNoMinimize () |
| Ideal & | operator= (const Ideal &ideal) |
| void | swap (Ideal &ideal) |
| template<class Predicate> | |
| bool | removeIf (Predicate pred) |
Static Public Member Functions | |
| static void | clearStaticCache () |
Protected Attributes | |
| size_t | _varCount |
| vector< Exponent * > | _terms |
| ExponentAllocator | _allocator |
Represents a monomial ideal with int exponents.
| Ideal::Ideal | ( | size_t | varCount = 0 | ) |
Initialize this object to the zero ideal in varCount variables.
|
explicit |
Initialize this object to the ideal generated by term.
| Ideal::Ideal | ( | const Ideal & | ideal | ) |
Initialize this object to be a copy of ideal.
|
static |
Ideal caches memory allocated with new internally and reuses it to avoid calling new all the time. Call this method to release the cache.
| bool Ideal::disjointSupport | ( | ) | const |
Returns true if all pairs of generators have disjoint support. I.e. if each var divides at most one generator.
| void Ideal::getGcd | ( | Exponent * | gcd | ) | const |
Sets gcd to the greatest common divisor of all generators. If there are no generators then we define the gcd as the identity.
| void Ideal::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 exp. If there are no such generators then we define the gcd as the identity.
| void Ideal::getGcdOfMultiplesOf | ( | Exponent * | gcd, |
| const Exponent * | divisor ) |
Sets gcd to the greatest common divisor of those generators that are divisible by divisor. If there are no such generators then we define the gcd as the identity.
| void Ideal::getLcm | ( | Exponent * | lcm | ) | const |
Sets lcm to the least common multiple of all generators. If there are no generators then we define the lcm as the identity.
| size_t Ideal::getMostNonGenericExponent | ( | size_t & | var, |
| Exponent & | exp ) |
Sets var and exp such that var^exp is the most non-generic degree. A unordered pair of generators a and b is non-generic if a and b raise some var to the same non-zero exponent and lcm(a,b) is not strictly divisible by any generator. The most non-generic degree is the exponent that occurs most often as the shared degree for non-generic pairs. In case of ties some deterministic choice is made.
The return value is the number of non-generic pairs that concern the most non-generic degree. If there are no non-generic pairs (i.e. the ideal is generic) then the return value is zero and var=exp=0.
This method is not const since it may re-arrange the generators for efficiency.
| bool Ideal::getNonGenericExponent | ( | size_t & | var, |
| Exponent & | exp ) |
Sets var and exp such that var^exp is some non-generic degree. Returns true if there are any non-generic degrees and otherwise returns false.
This method is not const since it may re-arrange the generators for efficiency.
| void Ideal::getSupportCounts | ( | Exponent * | counts | ) | const |
counts[var] will be the number of generators divisible by var.
| size_t Ideal::getTypicalExponent | ( | size_t & | var, |
| Exponent & | exp ) |
Sets var and exp such that var^exp is the typical non-zero exponent. The typical exponent is the exponent of a specific variable that occurs most often among the generators. In case of ties some deterministic choice is made. If there are no non-zero generators then var=exp=0 is chosen and the return value is zero. The returned value is the number of times the typical non-zero exponent occurs.
This method is not const since it may re-arrange the generators for efficiency.
| size_t Ideal::getTypicalNonGenericExponent | ( | size_t & | var, |
| Exponent & | exp ) |
Sets var and exp such that var^exp is the typical non-generic degree. A unordered pair of generators a and b is non-generic if a and b raise some var to the same non-zero exponent and lcm(a,b) is not strictly divisible by any generator. A degree var^exp is non-generic if it occurs as the shared degree for some non-generic pair. The typical non-generic degree is the non-generic degree that occurs most often among all generators. So it does not matter how non-generic the degree is, just that it is non-generic at all.
The return value is the number of generators that raise var to exp. If there are no non-generic pairs (i.e. the ideal is generic) then the return value is zero and var=exp=0.
This method is not const since it may re-arrange the generators for efficiency.
| void Ideal::mapExponentsToZeroNoMinimize | ( | const Term & | zeroExponents | ) |
Replaces the exponents from zeroExponents with zero and does not remove any non-minimal generators this may produce. If a generator raises var to precisely the power t, and zeroExponents also raises var to precisely the power t, then that generator is changed to instead raise var to the power zero.
| bool Ideal::operator== | ( | const Ideal & | ideal | ) | const |
Rereturns true if *this equals ideal. This comparison takes non-minimal generators and the order of the generators into account.
|
inline |
Removes those generators m such that pred(m) evaluates to true. Returns true if any generators were removed.
| void Ideal::takeRadicalNoMinimize | ( | ) |
Replaces all generators with their support and does not remove any non-minimal generators this may produce.