PolyBoRi
HasTRepOrExtendedProductCriterion.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 //*****************************************************************************
14 //*****************************************************************************
15 
16 #ifndef polybori_groebner_HasTRepOrExtendedProductCriterion_h_
17 #define polybori_groebner_HasTRepOrExtendedProductCriterion_h_
18 
19 // include basic definitions
20 #include "groebner_defs.h"
21 #include "GroebnerStrategy.h"
22 
24 
25 
26 inline bool
28  //BooleMonomial m;
30 
32  //if (res)
33  // cout<<"EXTENDED PRODUCT_CRIT";
34  return res;
35 }
36 
37 
43 public:
45  int j;
47  this->strat=&strat;
48  this->j=j;
49  }
50  bool operator() (const Monomial &m){
51  int i = strat->generators.index(m);
52 
53  if (strat->pairs.status.hasTRep(i,j))
54  return true;
55 
56  if (extended_product_criterion(const_cast<const GroebnerStrategy*>(strat)->generators[i],const_cast<const GroebnerStrategy*>(strat)->generators[j])){
57  strat->pairs.status.setToHasTRep(i,j);
58  strat->extendedProductCriterions++;
59  return true;
60  }
61  return false;
62  }
63  bool operator() (const Exponent &m){
64  int i;
65  i=strat->generators.index(m);
66 
67  if (strat->pairs.status.hasTRep(i,j))
68  return true;
69 
70  if (extended_product_criterion(const_cast<const GroebnerStrategy*>(strat)->generators[i],const_cast<const GroebnerStrategy*>(strat)->generators[j])){
71  strat->pairs.status.setToHasTRep(i,j);
72  strat->extendedProductCriterions++;
73  return true;
74  }
75  return false;
76  }
77 
78 };
79 
81 
82 #endif /* polybori_HasTRepOrExtendedProductCriterion_h_ */