|
|
delpi
0.0.1
DElta-complete LP solver
|
Symbolic formula used to represent a constraint in the LP problem. More...
#include <Formula.h>
Public Member Functions | |
| Formula | Substitute (const Expression::SubstitutionMap &s) const |
| Create a copy of this formula with the expression having all occurrences of the variables in s replaced with the corresponding variable in s. | |
| template<MapFromTo< Variable, mpq_class > T> | |
| bool | Evaluate (const T &env) const |
| Evaluates the formula using a given environment (by default, an empty environment). | |
Public Attributes | |
| Expression | expression_ |
| Left-hand side expression. | |
| FormulaKind | kind_ |
| Kind of the formula \( \in \\{ =\, \ne\, \le\, \ge\, <\, > \\} \). | |
| mpq_class | rhs_ |
| Right-hand side constant. | |
Symbolic formula used to represent a constraint in the LP problem.
A symbolic formula is therefore a comparison between an expression and a constant. If two expressions are used as the left-hand side and right-hand side of the comparison, a new expression is created by subtracting the right-hand side from the left-hand side and the comparison is made with zero.
|
nodiscard |
Evaluates the formula using a given environment (by default, an empty environment).
| T | map from variable to value (i.e. std::map<Variable, mpq_class>, std::unordered_map<Variable, mpq_class>) |
| env | map between each variable and its value |
| std::exception | if there exists variable in this expression whose assignment is not provided by env |
Definition at line 25 of file Formula.cpp.
|
nodiscard |
Create a copy of this formula with the expression having all occurrences of the variables in s replaced with the corresponding variable in s.
Note that the substitutions occur simultaneously.
| s | map of substitutions. Maps the old variable to the new one. |
Definition at line 21 of file Formula.cpp.