PolyBoRi
ShorterEliminationLengthModified.h
Go to the documentation of this file.
00001 // -*- c++ -*-
00002 //*****************************************************************************
00014 //*****************************************************************************
00015 
00016 #ifndef polybori_groebner_ShorterEliminationLengthModified_h_
00017 #define polybori_groebner_ShorterEliminationLengthModified_h_
00018 
00019 // include basic definitions
00020 #include "groebner_defs.h"
00021 #include "GroebnerStrategy.h"
00022 
00023 BEGIN_NAMESPACE_PBORIGB
00024 
00029 class ShorterEliminationLengthModified{
00030   public:
00031     const GroebnerStrategy* strat;
00032   wlen_type el;
00033   deg_type lm_deg;
00034   ShorterEliminationLengthModified(const GroebnerStrategy& strat,wlen_type el, deg_type  lm_deg){
00035     this->el=el;
00036     this->strat=&strat;
00037     this->lm_deg=lm_deg;
00038     
00039   }
00040   bool operator() (const Exponent& e){
00041 
00042     PBORI_ASSERT(e.deg()<=lm_deg);
00043 
00044     const PolyEntry* p=&strat->generators[e];
00045     return p->weightedLength<=el+(lm_deg-p->leadDeg)*p->length;
00046   }
00047 };
00048 
00049 END_NAMESPACE_PBORIGB
00050 
00051 #endif /* polybori_ShorterEliminationLengthModified_h_ */