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