carl  24.04
Computer ARithmetic Library
carl::ModelPolynomialSubstitution< Rational, Poly > Class Template Reference

#include <ModelPolynomialSubstitution.h>

Inheritance diagram for carl::ModelPolynomialSubstitution< Rational, Poly >:
Collaboration diagram for carl::ModelPolynomialSubstitution< Rational, Poly >:

Public Member Functions

 ModelPolynomialSubstitution (const Poly &p)
 
const auto & getPoly () const
 
virtual void multiplyBy (const Rational &n)
 Multiply this model substitution by a rational. More...
 
virtual void add (const Rational &n)
 Add a rational to this model substitution. More...
 
virtual ModelSubstitutionPtr< Rational, Poly > clone () const
 Create a copy of this model substitution. More...
 
virtual Formula< Poly > representingFormula (const ModelVariable &mv)
 
virtual ModelValue< Rational, Poly > evaluateSubstitution (const Model< Rational, Poly > &m) const
 Evaluate this substitution with respect to the given model. More...
 
virtual bool dependsOn (const ModelVariable &var) 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...
 
const ModelValue< Rational, Poly > & evaluate (const Model< Rational, Poly > &model) const
 
void resetCache () const
 
template<typename Iterator >
const ModelValue< Rational, Poly > & getModelValue (Iterator _mvit, Model< Rational, Poly > &_model)
 

Private Types

using Super = ModelSubstitution< Rational, Poly >
 

Private Attributes

Poly mPoly
 
std::optional< ModelValue< Rational, Poly > > mCachedValue
 

Detailed Description

template<typename Rational, typename Poly>
class carl::ModelPolynomialSubstitution< Rational, Poly >

Definition at line 8 of file ModelPolynomialSubstitution.h.

Member Typedef Documentation

◆ Super

template<typename Rational , typename Poly >
using carl::ModelPolynomialSubstitution< Rational, Poly >::Super = ModelSubstitution<Rational,Poly>
private

Definition at line 10 of file ModelPolynomialSubstitution.h.

Constructor & Destructor Documentation

◆ ModelPolynomialSubstitution()

template<typename Rational , typename Poly >
carl::ModelPolynomialSubstitution< Rational, Poly >::ModelPolynomialSubstitution ( const Poly &  p)
inline

Definition at line 13 of file ModelPolynomialSubstitution.h.

Member Function Documentation

◆ add()

template<typename Rational , typename Poly >
virtual void carl::ModelPolynomialSubstitution< Rational, Poly >::add ( const Rational _number)
inlinevirtual

Add a rational to this model substitution.

Implements carl::ModelSubstitution< Rational, Poly >.

Definition at line 21 of file ModelPolynomialSubstitution.h.

◆ clone()

template<typename Rational , typename Poly >
virtual ModelSubstitutionPtr<Rational,Poly> carl::ModelPolynomialSubstitution< Rational, Poly >::clone ( ) const
inlinevirtual

Create a copy of this model substitution.

Implements carl::ModelSubstitution< Rational, Poly >.

Definition at line 25 of file ModelPolynomialSubstitution.h.

◆ dependsOn()

template<typename Rational , typename Poly >
virtual bool carl::ModelPolynomialSubstitution< Rational, Poly >::dependsOn ( const ModelVariable ) const
inlinevirtual

Check if this substitution needs the given model variable.

Reimplemented from carl::ModelSubstitution< Rational, Poly >.

Definition at line 36 of file ModelPolynomialSubstitution.h.

Here is the call graph for this function:

◆ evaluate()

template<typename Rational , typename Poly >
const ModelValue<Rational, Poly>& carl::ModelSubstitution< Rational, Poly >::evaluate ( const Model< Rational, Poly > &  model) const
inlineinherited

Definition at line 37 of file ModelSubstitution.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ evaluateSubstitution()

template<typename Rational , typename Poly >
virtual ModelValue<Rational,Poly> carl::ModelPolynomialSubstitution< Rational, Poly >::evaluateSubstitution ( const Model< Rational, Poly > &  model) const
inlinevirtual

Evaluate this substitution with respect to the given model.

Implements carl::ModelSubstitution< Rational, Poly >.

Definition at line 33 of file ModelPolynomialSubstitution.h.

Here is the call graph for this function:

◆ getModelValue()

template<typename Rational , typename Poly >
template<typename Iterator >
const ModelValue<Rational,Poly>& carl::ModelSubstitution< Rational, Poly >::getModelValue ( Iterator  _mvit,
Model< Rational, Poly > &  _model 
)
inlineinherited

Definition at line 66 of file ModelSubstitution.h.

Here is the call graph for this function:

◆ getPoly()

template<typename Rational , typename Poly >
const auto& carl::ModelPolynomialSubstitution< Rational, Poly >::getPoly ( ) const
inline

Definition at line 15 of file ModelPolynomialSubstitution.h.

◆ multiplyBy()

template<typename Rational , typename Poly >
virtual void carl::ModelPolynomialSubstitution< Rational, Poly >::multiplyBy ( const Rational _number)
inlinevirtual

Multiply this model substitution by a rational.

Implements carl::ModelSubstitution< Rational, Poly >.

Definition at line 18 of file ModelPolynomialSubstitution.h.

◆ print()

template<typename Rational , typename Poly >
virtual void carl::ModelPolynomialSubstitution< Rational, Poly >::print ( std::ostream &  os) const
inlinevirtual

Print this substitution to the given output stream.

Reimplemented from carl::ModelSubstitution< Rational, Poly >.

Definition at line 40 of file ModelPolynomialSubstitution.h.

◆ representingFormula()

template<typename Rational , typename Poly >
virtual Formula<Poly> carl::ModelPolynomialSubstitution< Rational, Poly >::representingFormula ( const ModelVariable mv)
inlinevirtual

Implements carl::ModelSubstitution< Rational, Poly >.

Definition at line 29 of file ModelPolynomialSubstitution.h.

Here is the call graph for this function:

◆ resetCache()

template<typename Rational , typename Poly >
void carl::ModelSubstitution< Rational, Poly >::resetCache ( ) const
inlineinherited

Definition at line 43 of file ModelSubstitution.h.

Field Documentation

◆ mCachedValue

template<typename Rational , typename Poly >
std::optional<ModelValue<Rational, Poly> > carl::ModelSubstitution< Rational, Poly >::mCachedValue
mutableprivateinherited

Definition at line 28 of file ModelSubstitution.h.

◆ mPoly

template<typename Rational , typename Poly >
Poly carl::ModelPolynomialSubstitution< Rational, Poly >::mPoly
private

Definition at line 11 of file ModelPolynomialSubstitution.h.


The documentation for this class was generated from the following files: