SMT-RAT  24.02
Toolbox for Strategic and Parallel Satisfiability-Modulo-Theories Solving
Condition.h
Go to the documentation of this file.
1 /**
2  * Class to create a condition object.
3  * @author Florian Corzilius
4  * @since 2010-07-26
5  * @version 2011-12-05
6  */
7 
8 #pragma once
9 
10 #include <set>
12 
13 namespace smtrat {
14 namespace vs
15 {
16  /*
17  * Type and object definitions:
18  */
19 
20  class Condition
21  {
22  // Members:
23  static const double INFINITLY_MANY_SOLUTIONS_WEIGHT;
24 
25  private:
26 
27  mutable bool mFlag;
28  mutable bool mRecentlyAdded;
29  mutable size_t mValuation;
30  size_t mId;
32  carl::PointerSet<Condition>* mpOriginalConditions;
33 
34 
35  public:
36 
37  // Constructors:
38  Condition( const smtrat::ConstraintT&, size_t _id, size_t = 0, bool = false, const carl::PointerSet<Condition>& = carl::PointerSet<Condition>(), bool = false );
39  Condition( const Condition&, size_t _id );
40  Condition( const Condition& ) = delete;
41 
42  // Destructor:
43  ~Condition();
44 
45  // Methods:
46  bool& rFlag() const
47  {
48  return mFlag;
49  }
50 
51  bool flag() const
52  {
53  return mFlag;
54  }
55 
56  bool& rRecentlyAdded() const
57  {
58  return mRecentlyAdded;
59  }
60 
61  bool recentlyAdded() const
62  {
63  return mRecentlyAdded;
64  }
65 
66  size_t& rValuation() const
67  {
68  return mValuation;
69  }
70 
71  size_t valuation() const
72  {
73  return mValuation;
74  }
75 
76  size_t id() const
77  {
78  return mId;
79  }
80 
82  {
83  return mConstraint;
84  }
85 
86  carl::PointerSet<Condition>* pOriginalConditions() const
87  {
88  return mpOriginalConditions;
89  }
90 
91  const carl::PointerSet<Condition>& originalConditions() const
92  {
93  return *mpOriginalConditions;
94  }
95 
96  double valuate( const carl::Variable&, size_t, bool ) const;
97  bool operator==( const Condition& ) const;
98  bool operator<( const Condition& ) const;
99  friend std::ostream& operator<<( std::ostream& _out, const Condition& _condition );
100  void print( std::ostream& = std::cout ) const;
101  };
102 
103 } // end namspace vs
104 }
void print(std::ostream &=std::cout) const
Prints the condition to an output stream.
Definition: Condition.cpp:257
Condition(const Condition &)=delete
const smtrat::ConstraintT & constraint() const
Definition: Condition.h:81
static const double INFINITLY_MANY_SOLUTIONS_WEIGHT
Definition: Condition.h:23
bool & rRecentlyAdded() const
Definition: Condition.h:56
bool recentlyAdded() const
Definition: Condition.h:61
double valuate(const carl::Variable &, size_t, bool) const
Valuates the constraint according to a variable (it possibly not contains).
Definition: Condition.cpp:49
bool & rFlag() const
Definition: Condition.h:46
carl::PointerSet< Condition > * pOriginalConditions() const
Definition: Condition.h:86
smtrat::ConstraintT mConstraint
Definition: Condition.h:31
carl::PointerSet< Condition > * mpOriginalConditions
Definition: Condition.h:32
size_t id() const
Definition: Condition.h:76
friend std::ostream & operator<<(std::ostream &_out, const Condition &_condition)
Definition: Condition.cpp:246
bool flag() const
Definition: Condition.h:51
size_t valuation() const
Definition: Condition.h:71
size_t & rValuation() const
Definition: Condition.h:66
const carl::PointerSet< Condition > & originalConditions() const
Definition: Condition.h:91
bool operator<(const Condition &) const
Checks if the given condition (right hand side) is greater than this condition (left hand side).
Definition: Condition.cpp:241
bool operator==(const Condition &) const
Checks the equality of a given condition (right hand side) with this condition (left hand side).
Definition: Condition.cpp:228
Condition(const smtrat::ConstraintT &, size_t _id, size_t=0, bool=false, const carl::PointerSet< Condition > &=carl::PointerSet< Condition >(), bool=false)
Definition: Condition.cpp:15
Class to create the formulas for axioms.
carl::Constraint< Poly > ConstraintT
Definition: types.h:29