Frobby
0.9.5
|
This class handles the base cases for the Hilbert-Poincare series by Bigatti et.al. More...
#include <BigattiBaseCase.h>
Classes | |
struct | State |
Used in enumerateScarfComplex and necessary to have here to define _states. More... | |
Public Member Functions | |
BigattiBaseCase (const TermTranslator &translator) | |
Initialize this object to handle the computation of Hilbert-Poincare series numerator polynomials in a polynomial ring with varCount variables. More... | |
bool | genericBaseCase (const BigattiState &state) |
Returns ture if state is a base case slice while also considering genericity. More... | |
bool | baseCase (const BigattiState &state) |
Returns true if state is a base case slice without considering genericity. More... | |
void | output (bool plus, const Term &term) |
Add +term or -term to the output polynomial when plus is true or false respectively. More... | |
void | feedOutputTo (CoefBigTermConsumer &consumer, bool inCanonicalOrder) |
Feed the output Hilbert-Poincare numerator polynomial computed so far to the consumer. More... | |
void | setPrintDebug (bool value) |
Starts to print debug output on what happens if value is true. More... | |
void | setComputeUnivariate (bool value) |
Use the fine grading if value is false, otherwise grade each variable by the same variable t. More... | |
size_t | getTotalBaseCasesEver () const |
Returns the total number of base cases this object has seen. More... | |
size_t | getTotalTermsOutputEver () const |
Returns the total number of terms this object has output. More... | |
size_t | getTotalTermsInOutput () const |
Returns the number of terms in the output polynomial right now. More... | |
Private Member Functions | |
bool | simpleBaseCase (const BigattiState &state) |
Computes the Hilbert-Poincare series of state and returns true if state is a particularly simple and easily detected case. More... | |
bool | univariateAllFaces (const BigattiState &state) |
void | enumerateScarfComplex (const BigattiState &state, bool allFaces) |
The ideal in state must be weakly generic. More... | |
Private Attributes | |
vector< size_t > | _maxCount |
Term | _lcm |
mpz_class | _tmp |
HashPolynomial | _outputMultivariate |
The part of the finely graded Hilbert-Poincare numerator polynomial computed so far. More... | |
UniHashPolynomial | _outputUnivariate |
The part of the coarsely graded Hilbert-Poincare numerator polynomial computed so far. More... | |
vector< State > | _states |
Used in enumerateScarfCompex. More... | |
bool | _computeUnivariate |
Use the fine grading if false, otherwise grade each variable by the same variable t. More... | |
const TermTranslator & | _translator |
Used to translate the output from ints. More... | |
size_t | _totalBaseCasesEver |
For statistics. More... | |
size_t | _totalTermsOutputEver |
For statistics. More... | |
bool | _printDebug |
This class handles the base cases for the Hilbert-Poincare series by Bigatti et.al.
Definition at line 33 of file BigattiBaseCase.h.
BigattiBaseCase::BigattiBaseCase | ( | const TermTranslator & | translator | ) |
Initialize this object to handle the computation of Hilbert-Poincare series numerator polynomials in a polynomial ring with varCount variables.
Definition at line 25 of file BigattiBaseCase.cpp.
bool BigattiBaseCase::baseCase | ( | const BigattiState & | state | ) |
Returns true if state is a base case slice without considering genericity.
Definition at line 49 of file BigattiBaseCase.cpp.
|
private |
The ideal in state must be weakly generic.
Then the Hilbert-Poincare series is computed by enumerating the facet of the Scarf complex.
allFaces | If true then every subset of monomial ideals is a facet of the Scarf complex. This allows for faster computation if true but yields incorrect results if not. |
Definition at line 241 of file BigattiBaseCase.cpp.
void BigattiBaseCase::feedOutputTo | ( | CoefBigTermConsumer & | consumer, |
bool | inCanonicalOrder | ||
) |
Feed the output Hilbert-Poincare numerator polynomial computed so far to the consumer.
This is done in canonical order if inCanonicalOrder is true.
Definition at line 107 of file BigattiBaseCase.cpp.
bool BigattiBaseCase::genericBaseCase | ( | const BigattiState & | state | ) |
Returns ture if state is a base case slice while also considering genericity.
This generalizes the functionality of baseCase().
Definition at line 36 of file BigattiBaseCase.cpp.
size_t BigattiBaseCase::getTotalBaseCasesEver | ( | ) | const |
Returns the total number of base cases this object has seen.
Definition at line 124 of file BigattiBaseCase.cpp.
size_t BigattiBaseCase::getTotalTermsInOutput | ( | ) | const |
Returns the number of terms in the output polynomial right now.
Definition at line 132 of file BigattiBaseCase.cpp.
size_t BigattiBaseCase::getTotalTermsOutputEver | ( | ) | const |
Returns the total number of terms this object has output.
This can be substantially more than the number of terms in the output polynomial, since the sum of two terms can be just one term or even zero.
Definition at line 128 of file BigattiBaseCase.cpp.
void BigattiBaseCase::output | ( | bool | plus, |
const Term & | term | ||
) |
Add +term or -term to the output polynomial when plus is true or false respectively.
Definition at line 86 of file BigattiBaseCase.cpp.
void BigattiBaseCase::setComputeUnivariate | ( | bool | value | ) |
Use the fine grading if value is false, otherwise grade each variable by the same variable t.
Definition at line 120 of file BigattiBaseCase.cpp.
void BigattiBaseCase::setPrintDebug | ( | bool | value | ) |
Starts to print debug output on what happens if value is true.
Definition at line 116 of file BigattiBaseCase.cpp.
|
private |
Computes the Hilbert-Poincare series of state and returns true if state is a particularly simple and easily detected case.
Definition at line 139 of file BigattiBaseCase.cpp.
|
private |
Definition at line 168 of file BigattiBaseCase.cpp.
|
private |
Use the fine grading if false, otherwise grade each variable by the same variable t.
Definition at line 122 of file BigattiBaseCase.h.
|
private |
Definition at line 97 of file BigattiBaseCase.h.
|
private |
Definition at line 96 of file BigattiBaseCase.h.
|
private |
The part of the finely graded Hilbert-Poincare numerator polynomial computed so far.
Definition at line 102 of file BigattiBaseCase.h.
|
private |
The part of the coarsely graded Hilbert-Poincare numerator polynomial computed so far.
Definition at line 106 of file BigattiBaseCase.h.
|
private |
Definition at line 133 of file BigattiBaseCase.h.
|
private |
Used in enumerateScarfCompex.
Is not a local variable to avoid the cost of re-allocation at every call.
Definition at line 118 of file BigattiBaseCase.h.
|
private |
Definition at line 98 of file BigattiBaseCase.h.
|
private |
|
private |
|
private |
Used to translate the output from ints.
Definition at line 125 of file BigattiBaseCase.h.