PolyBoRi
LessUsedTailVariablesThenLessWeightedLengthInStrat.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 //*****************************************************************************
14 //*****************************************************************************
15 
16 #ifndef polybori_groebner_LessUsedTailVariablesThenLessWeightedLengthInStrat_h_
17 #define polybori_groebner_LessUsedTailVariablesThenLessWeightedLengthInStrat_h_
18 
19 // include basic definitions
20 #include "groebner_defs.h"
21 
23 
29 public:
32  this->strat=&strat;
33  }
34 
35  bool operator() (const Monomial& a, const Monomial& b) const{
36  return operator()(strat->generators[a], strat->generators[b]);
37  }
38 
39 private:
40  bool operator() (const PolyEntry& entry1, const PolyEntry& entry2) const {
41  deg_type d1 = entry1.tailVariables.deg();
42  deg_type d2 = entry2.tailVariables.deg();
43  if (d1 != d2)
44  return (d1 < d2);
45 
46  return (entry1.weightedLength < entry2.weightedLength);
47  }
48 
49 };
50 
52 
53 #endif /* polybori_LessUsedTailVariablesThenLessWeightedLengthInStrat_h_ */
#define END_NAMESPACE_PBORIGB
Definition: groebner_defs.h:16
int deg_type
Definition: groebner_defs.h:42
const GroebnerStrategy * strat
Definition: LessUsedTailVariablesThenLessWeightedLengthInStrat.h:30
Exponent tailVariables
Definition: PolyEntryBase.h:63
#define BEGIN_NAMESPACE_PBORIGB
Definition: groebner_defs.h:15
This class defines PolyEntry.
Definition: PolyEntry.h:32
This class defines LessUsedTailVariablesThenLessWeightedLengthInStrat.
Definition: LessUsedTailVariablesThenLessWeightedLengthInStrat.h:28
ReductionStrategy generators
Definition: GroebnerStrategy.h:204
LessUsedTailVariablesThenLessWeightedLengthInStrat(const GroebnerStrategy &strat)
Definition: LessUsedTailVariablesThenLessWeightedLengthInStrat.h:31
wlen_type weightedLength
Definition: PolyEntryBase.h:56
This class defines GroebnerStrategy.
Definition: GroebnerStrategy.h:41
This class is just a wrapper for using variables from cudd's decicion diagram.
Definition: BooleMonomial.h:50
deg_type deg() const
Degree of the corresponding monomial.
Definition: BooleExponent.h:118