carl  24.04
Computer ARithmetic Library
carl::contractor::Evaluation< Polynomial > Class Template Reference

Represents a contraction operation of the form. More...

#include <Contractor.h>

Collaboration diagram for carl::contractor::Evaluation< Polynomial >:

Public Member Functions

template<typename Number >
void normalize (std::vector< Interval< Number >> &intervals) const
 
 Evaluation (const Polynomial &p, Variable v)
 
auto var () const
 
const auto & numerator () const
 
const auto & denominator () const
 
auto root () const
 
const auto & dependees () const
 
template<typename Number >
std::vector< Interval< Number > > evaluate (const std::map< Variable, Interval< Number >> &assignment, const Interval< Number > &h=Interval< Number >(0, 0)) const
 Evaluate this contraction over the given assignment. More...
 

Private Member Functions

bool make_integer () const
 
template<typename Number >
void add_root (const Interval< Number > &i, std::vector< Interval< Number >> &result) const
 

Private Attributes

Variable mVar
 
Polynomial mNumerator
 
Polynomial mDenominator
 
std::size_t mRoot
 
std::vector< VariablemDependees
 

Detailed Description

template<typename Polynomial>
class carl::contractor::Evaluation< Polynomial >

Represents a contraction operation of the form.

mRoot'th root of (mNumerator / mDenominator)

Definition at line 22 of file Contractor.h.

Constructor & Destructor Documentation

◆ Evaluation()

template<typename Polynomial >
carl::contractor::Evaluation< Polynomial >::Evaluation ( const Polynomial &  p,
Variable  v 
)
inline

Definition at line 92 of file Contractor.h.

Here is the call graph for this function:

Member Function Documentation

◆ add_root()

template<typename Polynomial >
template<typename Number >
void carl::contractor::Evaluation< Polynomial >::add_root ( const Interval< Number > &  i,
std::vector< Interval< Number >> &  result 
) const
inlineprivate

Definition at line 35 of file Contractor.h.

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

◆ denominator()

template<typename Polynomial >
const auto& carl::contractor::Evaluation< Polynomial >::denominator ( ) const
inline

Definition at line 117 of file Contractor.h.

Here is the caller graph for this function:

◆ dependees()

template<typename Polynomial >
const auto& carl::contractor::Evaluation< Polynomial >::dependees ( ) const
inline

Definition at line 123 of file Contractor.h.

◆ evaluate()

template<typename Polynomial >
template<typename Number >
std::vector<Interval<Number> > carl::contractor::Evaluation< Polynomial >::evaluate ( const std::map< Variable, Interval< Number >> &  assignment,
const Interval< Number > &  h = Interval<Number>(0,0) 
) const
inline

Evaluate this contraction over the given assignment.

Returns a list of resulting intervals.

Allows to integrate a relation symbol as follows:

  • Transform relation into an interval (e.g. < 0 to = (-oo, 0))
  • Transform constraint to equality (e.g. p*x - q < 0 to p*x - q = h)
  • Evaluate with respect to interval h (e.g. x = (q + h) / p)

Definition at line 137 of file Contractor.h.

Here is the call graph for this function:

◆ make_integer()

template<typename Polynomial >
bool carl::contractor::Evaluation< Polynomial >::make_integer ( ) const
inlineprivate

Definition at line 30 of file Contractor.h.

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

◆ normalize()

template<typename Polynomial >
template<typename Number >
void carl::contractor::Evaluation< Polynomial >::normalize ( std::vector< Interval< Number >> &  intervals) const
inline

Definition at line 69 of file Contractor.h.

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

◆ numerator()

template<typename Polynomial >
const auto& carl::contractor::Evaluation< Polynomial >::numerator ( ) const
inline

Definition at line 114 of file Contractor.h.

Here is the caller graph for this function:

◆ root()

template<typename Polynomial >
auto carl::contractor::Evaluation< Polynomial >::root ( ) const
inline

Definition at line 120 of file Contractor.h.

Here is the caller graph for this function:

◆ var()

template<typename Polynomial >
auto carl::contractor::Evaluation< Polynomial >::var ( ) const
inline

Definition at line 111 of file Contractor.h.

Field Documentation

◆ mDenominator

template<typename Polynomial >
Polynomial carl::contractor::Evaluation< Polynomial >::mDenominator
private

Definition at line 26 of file Contractor.h.

◆ mDependees

template<typename Polynomial >
std::vector<Variable> carl::contractor::Evaluation< Polynomial >::mDependees
private

Definition at line 28 of file Contractor.h.

◆ mNumerator

template<typename Polynomial >
Polynomial carl::contractor::Evaluation< Polynomial >::mNumerator
private

Definition at line 25 of file Contractor.h.

◆ mRoot

template<typename Polynomial >
std::size_t carl::contractor::Evaluation< Polynomial >::mRoot
private

Definition at line 27 of file Contractor.h.

◆ mVar

template<typename Polynomial >
Variable carl::contractor::Evaluation< Polynomial >::mVar
private

Definition at line 24 of file Contractor.h.


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