PolyBoRi
PairECompare.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 //*****************************************************************************
14 //*****************************************************************************
15 
16 #ifndef polybori_groebner_PairECompare_h_
17 #define polybori_groebner_PairECompare_h_
18 
19 // include basic definitions
20 #include "groebner_defs.h"
21 
23 
28 class PairECompare:
29  public CFactoryBase {
30 public:
32  CFactoryBase(ring) {}
33 
35  bool operator() (const PairE& l, const PairE& r){
36  if (l.sugar!=r.sugar) return l.sugar>r.sugar; //greater sugar, less importance
37  if (l.wlen!=r.wlen) return l.wlen>r.wlen;
38  if (l.lm!=r.lm) return parent().ordering().compare(l.lm, r.lm)
39  == CTypes::greater_than;
40 
42  return false;
43  }
44 };
45 
47 
48 #endif /* polybori_PairECompare_h_ */
#define END_NAMESPACE_PBORIGB
Definition: groebner_defs.h:16
PairECompare(const BoolePolyRing &ring)
Definition: PairECompare.h:31
This class reinterprets decicion diagram managers as Boolean polynomial rings, adds an ordering and v...
Definition: BoolePolyRing.h:40
Exponent lm
Definition: PairE.h:40
#define BEGIN_NAMESPACE_PBORIGB
Definition: groebner_defs.h:15
This class defines PairE.
Definition: PairE.h:28
wlen_type wlen
Definition: PairE.h:35
deg_type sugar
Definition: PairE.h:36
This class defines PairECompare.
Definition: PairECompare.h:28
This base class CFactoryBase is used for currying other constructors with a BoolePolyRing.
Definition: CFactoryBase.h:35