27BigattiPivotStrategy::BigattiPivotStrategy() {
38 state.getIdeal().getSupportCounts(_counts);
39 size_t var = _counts.getFirstMaxExponent();
41 _pivot.reset(
state.getVarCount());
42 _pivot[var] =
state.getMedianPositiveExponentOf(var);
46 virtual const char*
getName()
const {
47 return staticGetName();
50 static const char* staticGetName() {
65 _ideal = &(
state.getIdeal());
78 size_t count = _ideal->getTypicalExponent(_var, _exp);
84 _ideal->getMostNonGenericExponent(_var, _exp);
88 _ideal->getTypicalNonGenericExponent(_var, _exp);
92 _ideal->getNonGenericExponent(_var, _exp);
99 _pivot.reset(_ideal->getVarCount());
108 _pivot.reset(_ideal->getVarCount());
109 _ideal->getGcdAtExponent(_pivot, _var, _exp);
110 ASSERT(!_pivot.isIdentity());
120 _ideal->singleDegreeSort(_var);
142 _pivot.reset(_ideal->getVarCount());
144 Term lcm(_ideal->getVarCount());
149 if (!_ideal->strictlyContains(lcm)) {
159 _pivot.gcd(_pivot, *
it);
169 ASSERT(!_pivot.isIdentity());
187 return _median.getPivot(*_state);
194 class MostNGPurePivot :
public GenericPivotCommon {
201 virtual const char* getName()
const {
202 return staticGetName();
205 static const char* staticGetName() {
210 class MostNGGcdPivot :
public GenericPivotCommon {
217 virtual const char* getName()
const {
218 return staticGetName();
221 static const char* staticGetName() {
226 class MostNGTightPivot :
public GenericPivotCommon {
233 virtual const char* getName()
const {
234 return staticGetName();
237 static const char* staticGetName() {
238 return "mostNGTight";
242 class TypicalNGPurePivot :
public GenericPivotCommon {
249 virtual const char* getName()
const {
250 return staticGetName();
253 static const char* staticGetName() {
254 return "typicalNGPure";
258 class TypicalNGGcdPivot :
public GenericPivotCommon {
265 virtual const char* getName()
const {
266 return staticGetName();
269 static const char* staticGetName() {
270 return "typicalNGGcd";
274 class TypicalNGTightPivot :
public GenericPivotCommon {
281 virtual const char* getName()
const {
282 return staticGetName();
285 static const char* staticGetName() {
286 return "typicalNGTight";
290 class TypicalPurePivot :
public GenericPivotCommon {
297 virtual const char* getName()
const {
298 return staticGetName();
301 static const char* staticGetName() {
302 return "typicalPure";
306 class TypicalGcdPivot :
public GenericPivotCommon {
313 virtual const char* getName()
const {
314 return staticGetName();
317 static const char* staticGetName() {
322 class TypicalTightPivot :
public GenericPivotCommon {
329 virtual const char* getName()
const {
330 return staticGetName();
333 static const char* staticGetName() {
334 return "typicalTight";
338 class SomeNGPurePivot :
public GenericPivotCommon {
345 virtual const char* getName()
const {
346 return staticGetName();
349 static const char* staticGetName() {
354 class SomeNGGcdPivot :
public GenericPivotCommon {
361 virtual const char* getName()
const {
362 return staticGetName();
365 static const char* staticGetName() {
370 class SomeNGTightPivot :
public GenericPivotCommon {
377 virtual const char* getName()
const {
378 return staticGetName();
381 static const char* staticGetName() {
382 return "someNGTight";
392 _name = _strategy->getName();
399 state.getIdeal().getGcdOfMultiplesOf(_widePivot,
pivot);
403 virtual const char*
getName()
const {
404 return _name.c_str();
440createStrategy(
const string& prefix,
bool widen) {
auto_ptr< AbstractProduct > createWithPrefix(const NameFactory< AbstractProduct > &factory, const string &prefix)
Creates the unique product that has the indicated prefix, or create the actual product that has name ...
void nameFactoryRegister(NameFactory< AbstractProduct > &factory)
Registers the string returned by ConcreteProduct::getStaticName() to a function that default-construc...
A BigattiPivotStrategy is an implementation of a pivot selection strategy for the Hilbert series algo...
virtual const char * getName() const =0
Returns the name of the strategy.
virtual ~BigattiPivotStrategy()
virtual const Term & getPivot(BigattiState &state)=0
Returns the pivot of a pivot split of state.
Represents a monomial ideal with int exponents.
Cont::const_iterator const_iterator
A NameFactory takes a name and then creates an instance of a class that has been previously registere...
Term represents a product of variables which does not include a coefficient.
void reset(size_t newVarCount)
void lcm(Word *res, const Word *resEnd, const Word *a, const Word *b)