PolyBoRi
PairLS.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 //*****************************************************************************
14 //*****************************************************************************
15 
16 #ifndef polybori_groebner_PairLS_h_
17 #define polybori_groebner_PairLS_h_
18 
19 // include basic definitions
20 #include "groebner_defs.h"
21 #include <boost/shared_ptr.hpp>
22 
24 
25 typedef boost::shared_ptr<PairData> pair_data_ptr;
26 
27 enum {
31 };
32 
33 
34 
39 class PairLS{
40 private:
41  int type;
42 public:
43  int getType() const{
44  return type;
45  }
48  //three sorts of pairs
49  //x*poly, poly, i,j
51  Monomial lm; //must not be the real lm, can be lm of syzygy or something else
53  return data->extract(v);
54  }
55  PairLS(int i, int j, const PolyEntryVector &v):
56  wlen(v[i].weightedLength+v[j].weightedLength-2),
57  data(new IJPairData(i,j)),
58  lm(v[i].lead*v[j].lead)
59  {
60  type=IJ_PAIR;
61  sugar=lm.deg()+std::max(v[i].ecart(),v[j].ecart());
62  }
63  PairLS(int i, idx_type v, const PolyEntryVector &gen,int type):
64  // sugar(gen[i].lmDeg+1),///@only do that because of bad criteria impl
65  wlen(gen[i].weightedLength+gen[i].length),
66  sugar(gen[i].deg+1),
67  data(new VariablePairData(i,v)), lm(gen[i].lead) {
69  this->type=type;
70  }
71 
72  PairLS(const Polynomial& delayed):
73  type(DELAYED_PAIR), wlen(delayed.eliminationLength()),
74  sugar(delayed.deg()),
75  data(new PolyPairData(delayed)),
76  lm(delayed.lead()) { }
77 
78 };
79 
81 
82 #endif /* polybori_PairLS_h_ */
deg_type deg() const
Degree of the monomial.
Definition: BooleMonomial.h:146
deg_type sugar
Definition: PairLS.h:47
boost::shared_ptr< PairData > pair_data_ptr
Definition: PairLS.h:25
Definition: PolyEntryVector.h:28
Polynomial extract(const PolyEntryVector &v)
Definition: PairLS.h:52
#define END_NAMESPACE_PBORIGB
Definition: groebner_defs.h:16
wlen_type wlen
Definition: PairLS.h:46
Definition: PairLS.h:29
int deg_type
Definition: groebner_defs.h:42
This class defines IJPairData.
Definition: IJPairData.h:28
This class defines PairLS.
Definition: PairLS.h:39
PairLS(int i, int j, const PolyEntryVector &v)
Definition: PairLS.h:55
This class defines VariablePairData.
Definition: VariablePairData.h:28
#define BEGIN_NAMESPACE_PBORIGB
Definition: groebner_defs.h:15
This class defines PolyPairData.
Definition: PolyPairData.h:28
PairLS(int i, idx_type v, const PolyEntryVector &gen, int type)
Definition: PairLS.h:63
Monomial lm
Definition: PairLS.h:51
This class wraps the underlying decicion diagram type and defines the necessary operations.
Definition: BoolePolynomial.h:85
Definition: PairLS.h:28
#define PBORI_ASSERT(arg)
Definition: pbori_defs.h:118
long wlen_type
Definition: groebner_defs.h:39
pair_data_ptr data
Definition: PairLS.h:50
int getType() const
Definition: PairLS.h:43
polybori::CTypes::idx_type idx_type
Definition: groebner_defs.h:44
PairLS(const Polynomial &delayed)
Definition: PairLS.h:72
This class is just a wrapper for using variables from cudd's decicion diagram.
Definition: BooleMonomial.h:50
Definition: PairLS.h:30