3 #include "../ModelSubstitution.h"
4 #include "../evaluation/ModelEvaluation.h"
7 template<
typename Rational,
typename Poly>
24 return createSubstitutionPtr<Rational,Poly,ModelConditionalSubstitution>(
mValues);
46 virtual void print(std::ostream& os)
const {
49 os <<
"if " << v.first <<
": " << v.second <<
"; ";
carl is the main namespace for the library.
std::vector< Formula< Poly > > Formulas
std::unique_ptr< ModelSubstitution< Rational, Poly > > ModelSubstitutionPtr
Represent a collection of assignments/mappings from variables to values.
Represent a expression for a ModelValue with variables as placeholders, where the final expression's ...
Represent a sum type/variant over the different kinds of values that can be assigned to the different...
Represent a sum type/variant over the different kinds of variables that exist in CARL to use them in ...
ModelConditionalSubstitution(const std::vector< std::pair< Formula< Poly >, ModelValue< Rational, Poly >>> &values)
virtual void print(std::ostream &os) const
Print this substitution to the given output stream.
virtual bool dependsOn(const ModelVariable &var) const
Check if this substitution needs the given model variable.
virtual ModelSubstitutionPtr< Rational, Poly > clone() const
Create a copy of this model substitution.
virtual void add(const Rational &n)
Add a rational to this model substitution.
ModelConditionalSubstitution(std::initializer_list< std::pair< Formula< Poly >, ModelValue< Rational, Poly >>> values)
virtual ModelValue< Rational, Poly > evaluateSubstitution(const Model< Rational, Poly > &model) const
Evaluate this substitution with respect to the given model.
virtual Formula< Poly > representingFormula(const ModelVariable &mv)
std::vector< std::pair< Formula< Poly >, ModelValue< Rational, Poly > > > mValues
virtual void multiplyBy(const Rational &n)
Multiply this model substitution by a rational.