PolyBoRi
PolyEntryBase.h
Go to the documentation of this file.
00001 // -*- c++ -*-
00002 //*****************************************************************************
00014 //*****************************************************************************
00015 
00016 #ifndef polybori_groebner_PolyEntryBase_h_
00017 #define polybori_groebner_PolyEntryBase_h_
00018 
00019 // include basic definitions
00020 #include "groebner_defs.h"
00021 
00022 BEGIN_NAMESPACE_PBORIGB
00023 
00029 class PolyEntryBase {
00030 public:
00031   PolyEntryBase(const Polynomial &poly):
00032     literal_factors(poly),
00033     p(poly), lead(poly.ring()), weightedLength(), 
00034     length(poly.length()), deg(poly.deg()), 
00035     // empty/zero default values to be filled below (TODO: use inheritance here)
00036     leadDeg(), leadExp(), gcdOfTerms(poly.ring()), 
00037     usedVariables(poly.usedVariablesExp()),
00038     tailVariables(), tail(poly.ring()),  minimal(true), vPairCalculated() {
00039     
00040     lead = p.boundedLead(deg);
00041     leadExp = lead.exp();
00042     leadDeg = leadExp.deg();
00043     
00044     if (leadDeg == deg)
00045       weightedLength = length;
00046     else
00047       weightedLength = poly.eliminationLengthWithDegBound(deg);
00048     
00049     tail = poly-lead;
00050     tailVariables = tail.usedVariablesExp();
00051   }
00052 
00053   LiteralFactorization literal_factors;
00054   Polynomial p;
00055   Monomial lead;
00056   wlen_type weightedLength;
00057   len_type length;
00058   deg_type deg;
00059   deg_type leadDeg;
00060   Exponent leadExp;
00061   Monomial gcdOfTerms;
00062   Exponent usedVariables;
00063   Exponent tailVariables;
00064   Polynomial tail;
00065   bool minimal;
00067   std::set<idx_type> vPairCalculated; 
00068 };
00069 
00070 END_NAMESPACE_PBORIGB
00071 
00072 #endif /* polybori_groebner_PolyEntryBase_h_ */