3 #include "../ModelSubstitution.h"
4 #include "../evaluation/ModelEvaluation.h"
7 template<
typename Rational,
typename Poly>
26 return createSubstitutionPtr<Rational,Poly,ModelPolynomialSubstitution>(
mPoly);
40 virtual void print(std::ostream& os)
const {
carl is the main namespace for the library.
std::unique_ptr< ModelSubstitution< Rational, Poly > > ModelSubstitutionPtr
Represent a collection of assignments/mappings from variables to values.
virtual Formula< Poly > representingFormula(const ModelVariable &mv)
const auto & getPoly() const
virtual void multiplyBy(const Rational &n)
Multiply this model substitution by a rational.
virtual void add(const Rational &n)
Add a rational to this model substitution.
virtual bool dependsOn(const ModelVariable &var) const
Check if this substitution needs the given model variable.
virtual void print(std::ostream &os) const
Print this substitution to the given output stream.
virtual ModelValue< Rational, Poly > evaluateSubstitution(const Model< Rational, Poly > &m) const
Evaluate this substitution with respect to the given model.
virtual ModelSubstitutionPtr< Rational, Poly > clone() const
Create a copy of this model substitution.
ModelPolynomialSubstitution(const Poly &p)
Represent a expression for a ModelValue with variables as placeholders, where the final expression's ...
const ModelValue< Rational, Poly > & evaluate(const Model< Rational, Poly > &model) const
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 ...
carl::Variable asVariable() const