Frobby  0.9.5
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
BigattiBaseCase Class Reference

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
 

Detailed Description

This class handles the base cases for the Hilbert-Poincare series by Bigatti et.al.

Definition at line 33 of file BigattiBaseCase.h.

Constructor & Destructor Documentation

◆ BigattiBaseCase()

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.

Member Function Documentation

◆ baseCase()

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.

◆ enumerateScarfComplex()

void BigattiBaseCase::enumerateScarfComplex ( const BigattiState state,
bool  allFaces 
)
private

The ideal in state must be weakly generic.

Then the Hilbert-Poincare series is computed by enumerating the facet of the Scarf complex.

Parameters
allFacesIf 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.

◆ feedOutputTo()

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.

◆ genericBaseCase()

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.

◆ getTotalBaseCasesEver()

size_t BigattiBaseCase::getTotalBaseCasesEver ( ) const

Returns the total number of base cases this object has seen.

Definition at line 124 of file BigattiBaseCase.cpp.

◆ getTotalTermsInOutput()

size_t BigattiBaseCase::getTotalTermsInOutput ( ) const

Returns the number of terms in the output polynomial right now.

Definition at line 132 of file BigattiBaseCase.cpp.

◆ getTotalTermsOutputEver()

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.

◆ output()

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.

◆ setComputeUnivariate()

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.

◆ setPrintDebug()

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.

◆ simpleBaseCase()

bool BigattiBaseCase::simpleBaseCase ( const BigattiState state)
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.

◆ univariateAllFaces()

bool BigattiBaseCase::univariateAllFaces ( const BigattiState state)
private

Definition at line 168 of file BigattiBaseCase.cpp.

Member Data Documentation

◆ _computeUnivariate

bool BigattiBaseCase::_computeUnivariate
private

Use the fine grading if false, otherwise grade each variable by the same variable t.

Definition at line 122 of file BigattiBaseCase.h.

◆ _lcm

Term BigattiBaseCase::_lcm
private

Definition at line 97 of file BigattiBaseCase.h.

◆ _maxCount

vector<size_t> BigattiBaseCase::_maxCount
private

Definition at line 96 of file BigattiBaseCase.h.

◆ _outputMultivariate

HashPolynomial BigattiBaseCase::_outputMultivariate
private

The part of the finely graded Hilbert-Poincare numerator polynomial computed so far.

Definition at line 102 of file BigattiBaseCase.h.

◆ _outputUnivariate

UniHashPolynomial BigattiBaseCase::_outputUnivariate
private

The part of the coarsely graded Hilbert-Poincare numerator polynomial computed so far.

Definition at line 106 of file BigattiBaseCase.h.

◆ _printDebug

bool BigattiBaseCase::_printDebug
private

Definition at line 133 of file BigattiBaseCase.h.

◆ _states

vector<State> BigattiBaseCase::_states
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.

◆ _tmp

mpz_class BigattiBaseCase::_tmp
private

Definition at line 98 of file BigattiBaseCase.h.

◆ _totalBaseCasesEver

size_t BigattiBaseCase::_totalBaseCasesEver
private

For statistics.

Can overflow.

Definition at line 128 of file BigattiBaseCase.h.

◆ _totalTermsOutputEver

size_t BigattiBaseCase::_totalTermsOutputEver
private

For statistics.

Can overflow.

Definition at line 131 of file BigattiBaseCase.h.

◆ _translator

const TermTranslator& BigattiBaseCase::_translator
private

Used to translate the output from ints.

Definition at line 125 of file BigattiBaseCase.h.


The documentation for this class was generated from the following files: