27(unique_ptr<Ideal> ideal,
30 unique_ptr<BigattiPivotStrategy> pivot,
40 ASSERT(ideal->isMinimallyGenerated());
56 _pivot = BigattiPivotStrategy::createStrategy(
"median",
true);
62 if (
_params.getPrintStatistics()) {
63 fputs(
"*** Statistics for run of Bigatti algorithm ***\n", stderr);
64 fprintf(stderr,
" %u states processed.\n",
65 (
unsigned int)
_tasks.getTotalTasksEver());
66 fprintf(stderr,
" %u base cases.\n",
67 (
unsigned int)
_baseCase.getTotalBaseCasesEver());
68 fprintf(stderr,
" %u terms output.\n",
69 (
unsigned int)
_baseCase.getTotalTermsOutputEver());
70 fprintf(stderr,
" %u terms in final output.\n",
71 (
unsigned int)
_baseCase.getTotalTermsInOutput());
76 if (
_params.getUseSimplification())
80 fputs(
"Debug: Processing state.\n", stderr);
84 bool isBaseCase =
_params.getUseGenericBaseCase() ?
94 fputs(
"Debug: Performing pivot split on ", stderr);
99 ASSERT(!state->getIdeal().contains(pivot));
101 unique_ptr<BigattiState> colonState(
_stateCache.newObjectCopy(*state));
102 colonState->colonStep(pivot);
103 _tasks.addTask(colonState.release());
105 state->addStep(pivot);
106 _tasks.addTask(state.release());
114 if (!gcd.isIdentity()) {
126 state->getIdeal().clear();
void freeState(unique_ptr< BigattiState > state)
unique_ptr< BigattiPivotStrategy > _pivot
BigattiHilbertAlgorithm(unique_ptr< Ideal > ideal, const TermTranslator &translator, const BigattiParams ¶ms, unique_ptr< BigattiPivotStrategy > pivot, CoefBigTermConsumer &consumer)
Construct an object for running the Bigatti et.al.
CoefBigTermConsumer * _consumer
BigattiBaseCase _baseCase
void simplify(BigattiState &state)
void setComputeUnivariate(bool value)
ObjectCache< BigattiState > _stateCache
void processState(unique_ptr< BigattiState > state)
friend class BigattiState
const TermTranslator & _translator
void colonStep(const Term &term)
const Term & getMultiply() const
const Ideal & getIdeal() const
void getGcd(Exponent *gcd) const
Sets gcd to the greatest common divisor of all generators.
TermTranslator handles translation between terms whose exponents are infinite precision integers and ...
Term represents a product of variables which does not include a coefficient.
static void print(FILE *file, const Exponent *e, size_t varCount)
Writes e to file in a format suitable for debug output.
static bool isIdentity(const Exponent *a, size_t varCount)
Returns whether a is 1, i.e. whether all entries of a are 0.
This header file includes common definitions and is included as the first line of code in every imple...