PolyBoRi
LessWeightedLengthInStrat.h
Go to the documentation of this file.
00001 // -*- c++ -*-
00002 //*****************************************************************************
00014 //*****************************************************************************
00015 
00016 #ifndef polybori_groebner_LessWeightedLengthInStrat_h_
00017 #define polybori_groebner_LessWeightedLengthInStrat_h_
00018 
00019 // include basic definitions
00020 #include "ReductionStrategy.h"
00021 #include "groebner_defs.h"
00022 
00023 BEGIN_NAMESPACE_PBORIGB
00024 
00029 class LessWeightedLengthInStrat{
00030 public:
00031   const ReductionStrategy* strat;
00032   LessWeightedLengthInStrat(const ReductionStrategy& strat){
00033     this->strat=&strat;
00034   }
00035   bool operator() (const Monomial& a , const Monomial& b){
00036     return (*strat)[a].weightedLength<(*strat)[b].weightedLength;
00037     
00038   }
00039   bool operator() (const Exponent& a , const Exponent& b){
00040     return (*strat)[a].weightedLength<(*strat)[b].weightedLength;
00041     
00042   }
00043 };
00044 
00045 END_NAMESPACE_PBORIGB
00046 
00047 #endif /* polybori_LessWeightedLengthInStrat_h_ */