PolyBoRi
PolyEntryBase.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 //*****************************************************************************
14 //*****************************************************************************
15 
16 #ifndef polybori_groebner_PolyEntryBase_h_
17 #define polybori_groebner_PolyEntryBase_h_
18 
19 // include basic definitions
20 #include "groebner_defs.h"
21 
23 
30 public:
31  PolyEntryBase(const Polynomial &poly):
32  literal_factors(poly),
33  p(poly), lead(poly.ring()), weightedLength(),
34  length(poly.length()), deg(poly.deg()),
35  // empty/zero default values to be filled below (TODO: use inheritance here)
36  leadDeg(), leadExp(), gcdOfTerms(poly.ring()),
37  usedVariables(poly.usedVariablesExp()),
38  tailVariables(), tail(poly.ring()), minimal(true), vPairCalculated() {
39 
40  lead = p.boundedLead(deg);
41  leadExp = lead.exp();
42  leadDeg = leadExp.deg();
43 
44  if (leadDeg == deg)
45  weightedLength = length;
46  else
47  weightedLength = poly.eliminationLengthWithDegBound(deg);
48 
49  tail = poly-lead;
50  tailVariables = tail.usedVariablesExp();
51  }
52 
65  bool minimal;
67  std::set<idx_type> vPairCalculated;
68 };
69 
71 
72 #endif /* polybori_groebner_PolyEntryBase_h_ */