25 _idealCacheDeleter(_idealCache),
113 outer->clearAndSetVarCount(varCount);
114 outer->insertNonMultiples(bestPivotVar, 1, *entry.
ideal);
120 newEntry.
ideal = outer.get();
149 entry.
ideal = &originalIdeal;
153 auto_ptr<Ideal> entryIdealDeleter;
160 auto_ptr<Ideal> newEntryIdealDeleter(newEntry.
ideal);
161 _todo.push_back(newEntry);
162 newEntryIdealDeleter.release();
168 if (entryIdealDeleter.get() != 0)
170 entry =
_todo.back();
173 ASSERT(entryIdealDeleter.get() == 0);
174 entryIdealDeleter.reset(entry.
ideal);
181 originalIdeal.
clear();
183 for (vector<Entry>::iterator it =
_todo.begin(); it !=
_todo.end(); ++it)
196 const Term& counts) {
197 if (counts[var] == 0)
202 for (
size_t other = 0; other < varCount; ++other) {
203 if (other == var || counts[other] == 0)
212 if ((*it)[var] == 0 && (*it)[other] > 0) {
228 for (
size_t var = 0; var < varCount; ++var) {
229 if (counts[var] != 1)
235 for (
size_t other = 0; other < varCount; ++other) {
236 if ((*it)[other] > 0) {
238 if (counts[other] == 1)
244 for (
size_t other = 0; other < varCount; ++other) {
245 if (counts[other] > 0) {
254 if (it == ideal.
end()) {
264 for (
size_t var = 0; var < varCount; ++var) {
277 return auto_ptr<Ideal>(
new Ideal());
void exceptionSafePushBack(Container &container, auto_ptr< Element > pointer)
bool canSimplify(size_t var, const Ideal &ideal, const Term &counts)
vector< Ideal * > _idealCache
void computeCoefficient(Ideal &ideal)
void freeIdeal(auto_ptr< Ideal > ideal)
bool stepComputation(Entry &entry, Entry &newEntry)
size_t eliminate1Counts(Ideal &ideal, Term &counts, bool &negate)
auto_ptr< Ideal > getNewIdeal()
const mpz_class & getLastCoefficient()
Represents a monomial ideal with int exponents.
void remove(const_iterator it)
size_t getGeneratorCount() const
const_iterator getMultiple(size_t var) const
Cont::const_iterator const_iterator
const_iterator end() const
const_iterator begin() const
void getSupportCounts(Exponent *counts) const
counts[var] will be the number of generators divisible by var.
bool colonReminimize(const Exponent *colon)
size_t getVarCount() const
Term represents a product of variables which does not include a coefficient.
void reset(size_t newVarCount)
static size_t getSizeOfSupport(const Exponent *a, size_t varCount)
Returns the number of variables such that divides .
size_t getVarCount() const
static bool isSquareFree(const Exponent *a, size_t varCount)
Returns whether a is square free, i.e. for each where .
static size_t getFirstMaxExponent(const Exponent *a, size_t varCount)
Returns a var such that a[var] >= a[i] for all i.