15 template<
typename Rational,
typename Poly>
class Model;
16 template<
typename Rational,
typename Poly>
class ModelFormulaSubstitution;
17 template<
typename Rational,
typename Poly>
class ModelMVRootSubstitution;
18 template<
typename Rational,
typename Poly>
class ModelPolynomialSubstitution;
25 template<
typename Rational,
typename Poly>
52 virtual void print(std::ostream& os)
const {
65 template<
typename Iterator>
76 template<
typename Rational,
typename Poly>
81 template<
typename Rational,
typename Poly>
88 template<
typename Rational,
typename Poly,
typename Substitution,
typename... Args>
92 template<
typename Rational,
typename Poly,
typename Substitution,
typename... Args>
94 return std::make_unique<Substitution>(std::forward<Args>(args)...);
96 template<
typename Rational,
typename Poly>
98 return createSubstitution<Rational,Poly,ModelMVRootSubstitution<Rational,Poly>>(mr);
Represent a dynamic root, also known as a "root expression".
carl is the main namespace for the library.
ModelValue< Rational, Poly > createSubstitution(Args &&... args)
std::ostream & operator<<(std::ostream &os, const BasicConstraint< Poly > &c)
Prints the given constraint on the given stream.
ModelSubstitutionPtr< Rational, Poly > createSubstitutionPtr(Args &&... args)
std::unique_ptr< ModelSubstitution< Rational, Poly > > ModelSubstitutionPtr
PositionIteratorType Iterator
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 ...
virtual ModelSubstitutionPtr< Rational, Poly > clone() const =0
Create a copy of this model substitution.
virtual ~ModelSubstitution() noexcept=default
virtual bool dependsOn(const ModelVariable &) const
Check if this substitution needs the given model variable.
virtual Formula< Poly > representingFormula(const ModelVariable &mv)=0
virtual void add(const Rational &_number)=0
Add a rational to this model substitution.
const ModelValue< Rational, Poly > & evaluate(const Model< Rational, Poly > &model) const
virtual void print(std::ostream &os) const
Print this substitution to the given output stream.
std::optional< ModelValue< Rational, Poly > > mCachedValue
ModelSubstitution()=default
virtual void multiplyBy(const Rational &_number)=0
Multiply this model substitution by a rational.
const ModelValue< Rational, Poly > & getModelValue(Iterator _mvit, Model< Rational, Poly > &_model)
virtual ModelValue< Rational, Poly > evaluateSubstitution(const Model< Rational, Poly > &model) const =0
Evaluate this substitution with respect to the given model.
Represent a sum type/variant over the different kinds of values that can be assigned to the different...
const ModelSubstitutionPtr< Rational, Poly > & asSubstitution() const
bool isSubstitution() const
Represent a sum type/variant over the different kinds of variables that exist in CARL to use them in ...