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_ */