LessUsedTailVariablesThenLessWeightedLengthInStrat.h
Go to the documentation of this file.
// -*- c++ -*-
//*****************************************************************************
//*****************************************************************************
#ifndef polybori_groebner_LessUsedTailVariablesThenLessWeightedLengthInStrat_h_
#define polybori_groebner_LessUsedTailVariablesThenLessWeightedLengthInStrat_h_
// include basic definitions
#include "groebner_defs.h"
BEGIN_NAMESPACE_PBORIGB
class LessUsedTailVariablesThenLessWeightedLengthInStrat{
public:
const GroebnerStrategy* strat;
LessUsedTailVariablesThenLessWeightedLengthInStrat(const GroebnerStrategy& strat){
this->strat=&strat;
}
bool operator() (const Monomial& a, const Monomial& b) const{
return operator()(strat->generators[a], strat->generators[b]);
}
private:
bool operator() (const PolyEntry& entry1, const PolyEntry& entry2) const {
deg_type d1 = entry1.tailVariables.deg();
deg_type d2 = entry2.tailVariables.deg();
if (d1 != d2)
return (d1 < d2);
return (entry1.weightedLength < entry2.weightedLength);
}
};
END_NAMESPACE_PBORIGB
#endif /* polybori_LessUsedTailVariablesThenLessWeightedLengthInStrat_h_ */
END_NAMESPACE_PBORIGB
#define END_NAMESPACE_PBORIGB
Definition: groebner_defs.h:16
polybori::groebner::deg_type
int deg_type
Definition: groebner_defs.h:42
polybori::groebner::LessUsedTailVariablesThenLessWeightedLengthInStrat::strat
const GroebnerStrategy * strat
Definition: LessUsedTailVariablesThenLessWeightedLengthInStrat.h:30
polybori::groebner::PolyEntryBase::tailVariables
Exponent tailVariables
Definition: PolyEntryBase.h:63
BEGIN_NAMESPACE_PBORIGB
#define BEGIN_NAMESPACE_PBORIGB
Definition: groebner_defs.h:15
polybori::groebner::PolyEntry
This class defines PolyEntry.
Definition: PolyEntry.h:32
polybori::groebner::LessUsedTailVariablesThenLessWeightedLengthInStrat
This class defines LessUsedTailVariablesThenLessWeightedLengthInStrat.
Definition: LessUsedTailVariablesThenLessWeightedLengthInStrat.h:28
polybori::groebner::GroebnerStrategy::generators
ReductionStrategy generators
Definition: GroebnerStrategy.h:204
polybori::groebner::LessUsedTailVariablesThenLessWeightedLengthInStrat::LessUsedTailVariablesThenLessWeightedLengthInStrat
LessUsedTailVariablesThenLessWeightedLengthInStrat(const GroebnerStrategy &strat)
Definition: LessUsedTailVariablesThenLessWeightedLengthInStrat.h:31
polybori::groebner::PolyEntryBase::weightedLength
wlen_type weightedLength
Definition: PolyEntryBase.h:56
groebner_defs.h
polybori::groebner::GroebnerStrategy
This class defines GroebnerStrategy.
Definition: GroebnerStrategy.h:41
polybori::BooleMonomial
This class is just a wrapper for using variables from cudd's decicion diagram.
Definition: BooleMonomial.h:50
polybori::BooleExponent::deg
deg_type deg() const
Degree of the corresponding monomial.
Definition: BooleExponent.h:118