SMT-RAT  24.02
Toolbox for Strategic and Parallel Satisfiability-Modulo-Theories Solving
MonomialMappingByVariablePool.h
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include <carl-common/memory/Singleton.h>
5 #include <string>
6 #include "Util.h"
7 
8 namespace smtrat{
9 
10  class MonomialMappingByVariablePool : public carl::Singleton<MonomialMappingByVariablePool>{
11  friend class carl::Singleton<MonomialMappingByVariablePool>;
12 
13  private:
14  // Members:
16  public:
18  return mMonomialMapping;
19  }
20 
21  private:
22  carl::Variable nullVariable = carl::fresh_real_variable("0");
23 
24  public:
25  void insertMonomialMapping(carl::Variable variable, carl::Monomial::Arg monomial) {
27  }
28 
29  carl::Variable variable(carl::Monomial::Arg monomial) {
30 
32 
33  for (it = mMonomialMapping.begin(); it != mMonomialMapping.end(); ++it) {
34  if (it->second == monomial)
35  return it->first;
36  }
37 
38  return nullVariable;
39  }
40 
41  bool isNull(carl::Variable variable){
42  return variable == nullVariable;
43  }
44 
45  carl::Monomial::Arg monomial(carl::Variable variable) {
46 
48 
49  it = mMonomialMapping.find(variable);
50  carl::Monomial::Arg monomial = it->second;
51 
52  if (it != mMonomialMapping.end()) {
53  carl::Monomial::Arg monomial = it->second;
54  return monomial;
55  }
56 
57  return nullptr;
58  }
59  };
60 
61 }
void insertMonomialMapping(carl::Variable variable, carl::Monomial::Arg monomial)
carl::Monomial::Arg monomial(carl::Variable variable)
carl::Variable variable(carl::Monomial::Arg monomial)
Class to create the formulas for axioms.
std::unordered_map< carl::Variable, carl::Monomial::Arg > MonomialMap
Definition: Util.h:11
std::unordered_map< carl::Variable, carl::Monomial::Arg >::iterator MonomialMapIterator
Definition: Util.h:10