carl
24.04
Computer ARithmetic Library
|
Represent a expression for a ModelValue with variables as placeholders, where the final expression's value depends on the bindings/values of these variables. More...
#include <ModelSubstitution.h>
Public Member Functions | |
ModelSubstitution ()=default | |
virtual | ~ModelSubstitution () noexcept=default |
const ModelValue< Rational, Poly > & | evaluate (const Model< Rational, Poly > &model) const |
void | resetCache () const |
virtual bool | dependsOn (const ModelVariable &) const |
Check if this substitution needs the given model variable. More... | |
virtual void | print (std::ostream &os) const |
Print this substitution to the given output stream. More... | |
virtual void | multiplyBy (const Rational &_number)=0 |
Multiply this model substitution by a rational. More... | |
virtual void | add (const Rational &_number)=0 |
Add a rational to this model substitution. More... | |
virtual ModelSubstitutionPtr< Rational, Poly > | clone () const =0 |
Create a copy of this model substitution. More... | |
virtual Formula< Poly > | representingFormula (const ModelVariable &mv)=0 |
template<typename Iterator > | |
const ModelValue< Rational, Poly > & | getModelValue (Iterator _mvit, Model< Rational, Poly > &_model) |
Protected Member Functions | |
virtual ModelValue< Rational, Poly > | evaluateSubstitution (const Model< Rational, Poly > &model) const =0 |
Evaluate this substitution with respect to the given model. More... | |
Private Attributes | |
std::optional< ModelValue< Rational, Poly > > | mCachedValue |
Represent a expression for a ModelValue with variables as placeholders, where the final expression's value depends on the bindings/values of these variables.
The values are given in the (abstract) form of a "carl::Model".
Definition at line 26 of file ModelSubstitution.h.
|
default |
|
virtualdefaultnoexcept |
|
pure virtual |
Add a rational to this model substitution.
Implemented in carl::ModelPolynomialSubstitution< Rational, Poly >, carl::ModelConditionalSubstitution< Rational, Poly >, carl::ModelMVRootSubstitution< Rational, Poly >, and carl::ModelFormulaSubstitution< Rational, Poly >.
|
pure virtual |
Create a copy of this model substitution.
Implemented in carl::ModelPolynomialSubstitution< Rational, Poly >, carl::ModelMVRootSubstitution< Rational, Poly >, carl::ModelFormulaSubstitution< Rational, Poly >, and carl::ModelConditionalSubstitution< Rational, Poly >.
|
inlinevirtual |
Check if this substitution needs the given model variable.
Reimplemented in carl::ModelPolynomialSubstitution< Rational, Poly >, carl::ModelMVRootSubstitution< Rational, Poly >, carl::ModelFormulaSubstitution< Rational, Poly >, and carl::ModelConditionalSubstitution< Rational, Poly >.
Definition at line 48 of file ModelSubstitution.h.
|
inline |
Definition at line 37 of file ModelSubstitution.h.
|
protectedpure virtual |
Evaluate this substitution with respect to the given model.
Implemented in carl::ModelConditionalSubstitution< Rational, Poly >, carl::ModelPolynomialSubstitution< Rational, Poly >, carl::ModelMVRootSubstitution< Rational, Poly >, and carl::ModelFormulaSubstitution< Rational, Poly >.
|
inline |
|
pure virtual |
Multiply this model substitution by a rational.
Implemented in carl::ModelPolynomialSubstitution< Rational, Poly >, carl::ModelConditionalSubstitution< Rational, Poly >, carl::ModelMVRootSubstitution< Rational, Poly >, and carl::ModelFormulaSubstitution< Rational, Poly >.
|
inlinevirtual |
Print this substitution to the given output stream.
Reimplemented in carl::ModelPolynomialSubstitution< Rational, Poly >, carl::ModelMVRootSubstitution< Rational, Poly >, carl::ModelFormulaSubstitution< Rational, Poly >, and carl::ModelConditionalSubstitution< Rational, Poly >.
Definition at line 52 of file ModelSubstitution.h.
|
pure virtual |
|
inline |
Definition at line 43 of file ModelSubstitution.h.
|
mutableprivate |
Definition at line 28 of file ModelSubstitution.h.