PolyBoRi
IsVariableOfIndex.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 //*****************************************************************************
14 //*****************************************************************************
15 
16 #ifndef polybori_groebner_IsVariableOfIndex_h_
17 #define polybori_groebner_IsVariableOfIndex_h_
18 
19 // include basic definitions
20 #include "groebner_defs.h"
21 
22 #include "PolyEntry.h"
23 
25 
32 public:
33  IsVariableOfIndex(idx_type value): m_value(value) {}
34 
35  bool operator()(const PolyEntry& rhs) const {
36  return (rhs.isSingleton() && rhs.usedVariables.deg() == 1) &&
37  (*(rhs.usedVariables.begin()) == m_value);
38  }
39 
40 private:
41  idx_type m_value;
42 };
43 
45 
46 #endif /* polybori_groebner_IsVariableOfIndex_h_ */