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