Represents an operator or function with an arbitrary number of arguments in the expression tree. More...
#include <computeExpression.hpp>

Public Types | |
| using | ArgExprs = std::tuple<T_ArgExprs...> |
| See ComputeExpression. | |
| using | ArgReals = std::tuple<typename T_ArgExprs::Real...> |
| Real type of all arguments. | |
| using | ArgStores = TupleMemory<typename T_ArgExprs::StoreAs...> |
| Store type of all arguments. | |
| using | ArgStoresTypes |
| Store types of all arguments as regular tuple. | |
| template<typename T> | |
| using | Operation = T_Operation<T> |
| See ComputeExpression. | |
| using | Real = T_Real |
| See ComputeExpression. | |
| Public Types inherited from codi::ExpressionInterface< T_Real, ComputeExpression< T_Real, T_Operation, T_ArgExprs... > > | |
| using | ADLogic |
| AD logic that governs the expression. Needs to be the same for all inputs of the expression. | |
| using | Impl |
| See ExpressionInterface. | |
| using | Real |
| See ExpressionInterface. | |
| using | StoreAs |
| Defines how this expression is stored in an expression tree. | |
| Public Types inherited from codi::NodeInterface< ComputeExpression< T_Real, T_Operation, T_ArgExprs... > > | |
| using | Impl |
| See NodeInterface. | |
| Public Types inherited from codi::ExpressionMemberOperations< T_Real, ComputeExpression< T_Real, T_Operation, T_ArgExprs... > > | |
| using | Impl |
| See ExpressionMemberOperations. | |
| using | Real |
| See ExpressionMemberOperations. | |
Public Member Functions | |
| inlineexplicit | ComputeExpression (ExpressionInterface< typename T_ArgExprs::Real, T_ArgExprs > const &... args) |
| Constructor. | |
| inlineComputeExpression (ComputeExpression const &v)=default | |
| Constructor. | |
| Public Member Functions inherited from codi::ExpressionInterface< T_Real, ComputeExpression< T_Real, T_Operation, T_ArgExprs... > > | |
| inlineImpl const & | cast () const |
| Cast to the implementation. | |
| ExpressionInterface ()=default | |
| Constructor. | |
| inlineReal const | getValue () const |
| Compute the primal value that is usually evaluated by the statement/expression. | |
| inlineauto | applyTangent (Tangent const &tangent) const |
| inlineauto | applyAdjoint (Adjoint const &adjoint) const |
| Public Member Functions inherited from codi::NodeInterface< ComputeExpression< T_Real, T_Operation, T_ArgExprs... > > | |
| inlineImpl const & | cast () const |
| Cast to the implementation. | |
| char const & | getLink () const |
| an expression. | |
Public Attributes | |
| ArgStores | args |
| Tuple of all expression arguments. | |
| Real | result |
| Precomputed result. | |
Implementation of ExpressionInterface | |
| using | StoreAs = ComputeExpression |
| See ExpressionInterface. | |
| using | ADLogic |
| See ExpressionInterface. | |
| inlinestd::string | getMathRep () const |
| Get the math symbol of the operation. E.g. + for operators and pow() for functions. | |
| inlineReal const & | getValue () const |
| Compute the primal value that is usually evaluated by the statement/expression. | |
| template<size_t argNumber, typename Tangent> | |
| inlineReal | applyTangent (Tangent const &tangent) const |
| template<size_t argNumber, typename Adjoint> | |
| inlineauto | applyAdjoint (Adjoint const &adjoint) const |
Implementation of NodeInterface | |
| static size_t constexpr | LinkCount = std::tuple_size<ArgReals>::value |
| See NodeInterface. | |
| template<size_t argNumber> | |
| inlinestd::tuple_element_t< argNumber, ArgStoresTypes > const & | getLink () const |
| an expression. | |
Additional Inherited Members | |
| static size_t constexpr | LinkCount |
| handle the expression as a leaf node. | |
| Protected Member Functions inherited from codi::ExpressionMemberOperations< T_Real, ComputeExpression< T_Real, T_Operation, T_ArgExprs... > > | |
| inlineImpl const & | cast () const |
| Cast to implementation. | |
Represents an operator or function with an arbitrary number of arguments in the expression tree.
See Expression design documentation for details about the expression system in CoDiPack.
| T_Real | Original primal value of the statement/expression. |
| T_Operation | The logic for computing the primal value and Jacobians. Must implement BinaryOperation. |
| T_ArgExprs | The ExpressionInterface types of the arguments. |
| using codi::ComputeExpression< T_Real, T_Operation, T_ArgExprs >::ADLogic |
See ExpressionInterface.
| using codi::ComputeExpression< T_Real, T_Operation, T_ArgExprs >::ArgStoresTypes |
Store types of all arguments as regular tuple.
|
inline |
Apply the AD reverse mode on the expression with respect to the given parameter.
This is just the local reverse mode application and not the one for the whole expression tree.
Does not need to be implemented for expressions with NodeInterface::LinkCount = 0 .
Real f(complex<Real>, Real) the type with argNumber=0 is complex<Real> or Direction<complex<Real>> , with argNumber=1 it is Real or Direction<Real> .| Adjoint | The type of the result or a compatible vector type. E.g. Real or Direction<Real>. |
Forwards to the operator implementation.
|
inline |
Apply the AD forward mode on the expression with respect to the given parameter.
This is just the local forward mode application and not the one for the whole expression tree.
Does not need to be implemented for expressions with NodeInterface::LinkCount = 0 .
| Tangent | The type is the Real type of the selected argument or a compatible vector type. E.g. for Real f(complex<Real>, Real) the type with argNumber=0 is complex<Real> or Direction<complex<Real>> , with argNumber=1 it is Real or Direction<Real> . |
Forwards to the operator implementation.
|
inline |
an expression.
Get the argument for the specific link. Usually
|
inline |
Get the math symbol of the operation. E.g. + for operators and pow() for functions.
|
inline |
Compute the primal value that is usually evaluated by the statement/expression.