PolyBoRi
ChainCriterion.h
Go to the documentation of this file.
00001 // -*- c++ -*-
00002 //*****************************************************************************
00014 //*****************************************************************************
00015 
00016 #ifndef polybori_groebner_ChainCriterion_h_
00017 #define polybori_groebner_ChainCriterion_h_
00018 
00019 // include basic definitions
00020 #include "groebner_defs.h"
00021 #include "GroebnerStrategy.h"
00022 
00023 BEGIN_NAMESPACE_PBORIGB
00024 
00029 class ChainCriterion{
00031 public:
00032   const GroebnerStrategy* strat;
00033   int i,j;
00034   ChainCriterion(const GroebnerStrategy& strat, int i, int j){
00035     this->strat=&strat;
00036     this->i=i;
00037     this->j=j;
00038   }
00039   bool operator() (const Exponent& lmExp){
00040     int index=strat->generators.index(lmExp);
00041     //we know such an entry exists
00042     if ((index!=i)&&(index!=j)){
00043       if ((strat->pairs.status.hasTRep(i,index)) && (strat->pairs.status.hasTRep(j,index))){
00044         
00045         return true;
00046       }
00047     }
00048     return false;
00049   }
00050 };
00051 
00052 END_NAMESPACE_PBORIGB
00053 
00054 #endif /* polybori_ChainCriterion_h_ */