OASIS
Open Algebra Software
Loading...
Searching...
No Matches
Oasis::BoundedUnaryExpression< DerivedT, OperandT, LowerBoundT, UpperBoundT > Class Template Reference

#include <Oasis/BoundedUnaryExpression.hpp>

Inheritance diagram for Oasis::BoundedUnaryExpression< DerivedT, OperandT, LowerBoundT, UpperBoundT >:
[legend]
Collaboration diagram for Oasis::BoundedUnaryExpression< DerivedT, OperandT, LowerBoundT, UpperBoundT >:
[legend]

Public Member Functions

 BoundedUnaryExpression ()=default
 
 BoundedUnaryExpression (const BoundedUnaryExpression &other)
 
 BoundedUnaryExpression (const OperandT &operand, const LowerBoundT &lowerBound, const UpperBoundT &upperBound)
 
auto Copy () const -> std::unique_ptr< Expression > final
 Copies this expression.
 
auto Copy (tf::Subflow &) const -> std::unique_ptr< Expression > final
 
auto Differentiate (const Expression &differentiationVariable) const -> std::unique_ptr< Expression > override
 Tries to differentiate this function.
 
auto Equals (const Expression &other) const -> bool final
 Compares this expression to another expression for equality.
 
auto HasOperand () const -> bool
 
auto GetOperand () const -> const OperandT &
 
template<typename T >
requires IsAnyOf<T, OperandT, Expression>
void SetOperand (const T &expr)
 
auto Substitute (const Expression &var, const Expression &val) -> std::unique_ptr< Expression > override
 
auto operator= (const BoundedUnaryExpression &other) -> BoundedUnaryExpression &=default
 
void Serialize (SerializationVisitor &visitor) const override
 This function serializes the expression object.
 
- Public Member Functions inherited from Oasis::BoundedExpression< LowerBoundT, UpperBoundT >
 BoundedExpression ()=default
 
 BoundedExpression (const BoundedExpression &other)
 
 BoundedExpression (const LowerBoundT &lowerBound, const UpperBoundT &upperBound)
 
auto HasLowerBound () const -> bool
 
auto HasUpperBound () const -> bool
 
auto GetLowerBound () const -> const LowerBoundT &
 
auto GetUpperBound () const -> const UpperBoundT &
 
template<typename T >
requires IsAnyOf<T, LowerBoundT, Expression>
void SetLowerBound (const T &expr)
 
template<typename T >
requires IsAnyOf<T, UpperBoundT, Expression>
void SetUpperBound (const T &expr)
 
- Public Member Functions inherited from Oasis::Expression
auto FindZeros () const -> std::vector< std::unique_ptr< Expression > >
 The FindZeros function finds all rational real zeros, and up to 2 irrational/complex zeros of a polynomial.
 
virtual auto GetCategory () const -> uint32_t
 Gets the category of this expression.
 
virtual auto GetType () const -> ExpressionType
 Gets the type of this expression.
 
virtual auto Generalize () const -> std::unique_ptr< Expression >
 Converts this expression to a more general expression.
 
virtual auto Integrate (const Expression &) const -> std::unique_ptr< Expression >
 Attempts to integrate this expression using integration rules.
 
virtual auto IntegrateWithBounds (const Expression &, const Expression &, const Expression &) -> std::unique_ptr< Expression >
 Attempts to integrate this expression using integration rules.
 
template<IExpression T>
bool Is () const
 Gets whether this expression is of a specific type.
 
template<template< typename > typename T>
bool Is () const
 
template<template< typename, typename > typename T>
bool Is () const
 
virtual auto Simplify () const -> std::unique_ptr< Expression >
 Simplifies this expression.
 
virtual auto StructurallyEquivalent (const Expression &other) const -> bool=0
 Checks whether this expression is structurally equivalent to another expression.
 
virtual ~Expression ()=default
 

Constructor & Destructor Documentation

◆ BoundedUnaryExpression() [1/3]

template<template< IExpression, IExpression, IExpression > class DerivedT, IExpression OperandT, IExpression LowerBoundT = Expression, IExpression UpperBoundT = LowerBoundT>
Oasis::BoundedUnaryExpression< DerivedT, OperandT, LowerBoundT, UpperBoundT >::BoundedUnaryExpression ( )
default

◆ BoundedUnaryExpression() [2/3]

template<template< IExpression, IExpression, IExpression > class DerivedT, IExpression OperandT, IExpression LowerBoundT = Expression, IExpression UpperBoundT = LowerBoundT>
Oasis::BoundedUnaryExpression< DerivedT, OperandT, LowerBoundT, UpperBoundT >::BoundedUnaryExpression ( const BoundedUnaryExpression< DerivedT, OperandT, LowerBoundT, UpperBoundT > & other)
inline

◆ BoundedUnaryExpression() [3/3]

template<template< IExpression, IExpression, IExpression > class DerivedT, IExpression OperandT, IExpression LowerBoundT = Expression, IExpression UpperBoundT = LowerBoundT>
Oasis::BoundedUnaryExpression< DerivedT, OperandT, LowerBoundT, UpperBoundT >::BoundedUnaryExpression ( const OperandT & operand,
const LowerBoundT & lowerBound,
const UpperBoundT & upperBound )
inline

Member Function Documentation

◆ Copy() [1/2]

template<template< IExpression, IExpression, IExpression > class DerivedT, IExpression OperandT, IExpression LowerBoundT = Expression, IExpression UpperBoundT = LowerBoundT>
auto Oasis::BoundedUnaryExpression< DerivedT, OperandT, LowerBoundT, UpperBoundT >::Copy ( ) const -> std::unique_ptr< Expression >
inlinefinalvirtual

Copies this expression.

Returns
A copy of this expression.

Implements Oasis::Expression.

◆ Copy() [2/2]

template<template< IExpression, IExpression, IExpression > class DerivedT, IExpression OperandT, IExpression LowerBoundT = Expression, IExpression UpperBoundT = LowerBoundT>
auto Oasis::BoundedUnaryExpression< DerivedT, OperandT, LowerBoundT, UpperBoundT >::Copy ( tf::Subflow & ) const -> std::unique_ptr<Expression>
inlinefinal

◆ Differentiate()

template<template< IExpression, IExpression, IExpression > class DerivedT, IExpression OperandT, IExpression LowerBoundT = Expression, IExpression UpperBoundT = LowerBoundT>
auto Oasis::BoundedUnaryExpression< DerivedT, OperandT, LowerBoundT, UpperBoundT >::Differentiate ( const Expression & ) const -> std::unique_ptr<Expression>
inlineoverridevirtual

Tries to differentiate this function.

Returns
the differentiated expression.

Reimplemented from Oasis::Expression.

◆ Equals()

template<template< IExpression, IExpression, IExpression > class DerivedT, IExpression OperandT, IExpression LowerBoundT = Expression, IExpression UpperBoundT = LowerBoundT>
auto Oasis::BoundedUnaryExpression< DerivedT, OperandT, LowerBoundT, UpperBoundT >::Equals ( const Expression & other) const -> bool
inlinefinalvirtual

Compares this expression to another expression for equality.

Two expressions are equal if they are structurally equivalent and have the same value. While this method considers the associativity and commutativity of expressions, it does not simplify the expressions before comparing them. For example, Add<Real>(Real(1), Real(2)) and Add<Real>(Real(2), Real(1)) are not equal, despite being structurally equivalent.

Parameters
otherThe other expression.
Returns
Whether the two expressions are equal.

Implements Oasis::Expression.

◆ GetOperand()

template<template< IExpression, IExpression, IExpression > class DerivedT, IExpression OperandT, IExpression LowerBoundT = Expression, IExpression UpperBoundT = LowerBoundT>
auto Oasis::BoundedUnaryExpression< DerivedT, OperandT, LowerBoundT, UpperBoundT >::GetOperand ( ) const -> const OperandT&
inline

◆ HasOperand()

template<template< IExpression, IExpression, IExpression > class DerivedT, IExpression OperandT, IExpression LowerBoundT = Expression, IExpression UpperBoundT = LowerBoundT>
auto Oasis::BoundedUnaryExpression< DerivedT, OperandT, LowerBoundT, UpperBoundT >::HasOperand ( ) const -> bool
inline

◆ operator=()

template<template< IExpression, IExpression, IExpression > class DerivedT, IExpression OperandT, IExpression LowerBoundT = Expression, IExpression UpperBoundT = LowerBoundT>
auto Oasis::BoundedUnaryExpression< DerivedT, OperandT, LowerBoundT, UpperBoundT >::operator= ( const BoundedUnaryExpression< DerivedT, OperandT, LowerBoundT, UpperBoundT > & other) -> BoundedUnaryExpression &=default
default

◆ Serialize()

template<template< IExpression, IExpression, IExpression > class DerivedT, IExpression OperandT, IExpression LowerBoundT = Expression, IExpression UpperBoundT = LowerBoundT>
void Oasis::BoundedUnaryExpression< DerivedT, OperandT, LowerBoundT, UpperBoundT >::Serialize ( SerializationVisitor & visitor) const
inlineoverridevirtual

This function serializes the expression object.

Parameters
visitorThe serializer class object to write the Expression data.

Implements Oasis::Expression.

◆ SetOperand()

template<template< IExpression, IExpression, IExpression > class DerivedT, IExpression OperandT, IExpression LowerBoundT = Expression, IExpression UpperBoundT = LowerBoundT>
template<typename T >
requires IsAnyOf<T, OperandT, Expression>
void Oasis::BoundedUnaryExpression< DerivedT, OperandT, LowerBoundT, UpperBoundT >::SetOperand ( const T & expr)
inline

◆ Substitute()

template<template< IExpression, IExpression, IExpression > class DerivedT, IExpression OperandT, IExpression LowerBoundT = Expression, IExpression UpperBoundT = LowerBoundT>
auto Oasis::BoundedUnaryExpression< DerivedT, OperandT, LowerBoundT, UpperBoundT >::Substitute ( const Expression & var,
const Expression & val ) -> std::unique_ptr<Expression>
inlineoverridevirtual

Implements Oasis::Expression.


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