Defines an aggregated type via an array and implements the ExpressionInterface. More...
#include <aggregatedActiveType.hpp>
Public Types | |
using | ADLogic = Tape |
AD logic that governs the expression. Needs to be the same for all inputs of the expression. | |
using | Impl = T_Impl |
See AggregatedActiveTypeBase. | |
using | InnerActiveType |
See AggregatedActiveTypeBase. | |
using | InnerIdentifier = typename Tape::Identifier |
Identifier of the underlying tape. | |
using | InnerReal = typename Traits::InnerType |
Inner real type of the active type. | |
using | Real = T_Real |
See AggregatedActiveTypeBase. | |
using | StoreAs = typename std::conditional<isStatic, Impl, Impl const&>::type |
Implementation of ExpressionInterface. | |
using | Tape = typename InnerActiveType::Tape |
The tape of the inner active type. | |
using | Traits = RealTraits::AggregatedTypeTraits<Real> |
The traits for the aggregated type. | |
![]() | |
using | ADLogic = char |
AD logic that governs the expression. Needs to be the same for all inputs of the expression. | |
using | Impl = T_Impl |
See ExpressionInterface. | |
using | Real = T_Real |
See ExpressionInterface. | |
using | StoreAs = ExpressionInterface |
Defines how this expression is stored in an expression tree. | |
![]() | |
using | Impl = T_Impl |
See NodeInterface. | |
![]() | |
using | Impl = T_Impl |
See ExpressionMemberOperations. | |
using | Real = T_Real |
See ExpressionMemberOperations. | |
Public Member Functions | |
template<size_t argNumber> | |
inlineInnerReal | applyAdjoint (Real const &adjoint) const |
template<size_t argNumber> | |
inlineReal | applyTangent (InnerReal const &tangent) const |
template<size_t argNumber> | |
inlineInnerActiveType const & | getLink () const |
an expression. | |
inlineReal const | getValue () const |
Compute the primal value that is usually evaluated by the statement/expression. | |
inlineAggregatedActiveTypeBase ()=default | |
Constructor. | |
inlineAggregatedActiveTypeBase (AggregatedActiveTypeBase const &)=default | |
Constructor. | |
inline | ~AggregatedActiveTypeBase ()=default |
Destructor. | |
![]() | |
inlineImpl const & | cast () const |
Cast to the implementation. | |
ExpressionInterface ()=default | |
Constructor. | |
ExpressionInterface (ExpressionInterface const &)=default | |
Constructor. | |
inlineReal const | getValue () const |
Compute the primal value that is usually evaluated by the statement/expression. | |
template<size_t argNumber, typename Tangent> | |
inlineauto | applyTangent (Tangent const &tangent) const |
template<size_t argNumber, typename Adjoint> | |
inlineauto | applyAdjoint (Adjoint const &adjoint) const |
![]() | |
inlineImpl const & | cast () const |
Cast to the implementation. | |
template<size_t argNumber> | |
char const & | getLink () const |
an expression. | |
Static Public Member Functions | |
static inlinestd::string | getMathRep () |
Get the math symbol of the operation. E.g. + for operators and pow() for functions. | |
Public Attributes | |
InnerActiveType | values [Elements] |
Array representation. | |
Static Public Attributes | |
static int constexpr | Elements = Traits::Elements |
The number of elements in the aggregated type. | |
static bool constexpr | isStatic = T_isStatic |
See AggregatedActiveTypeBase. | |
static size_t constexpr | LinkCount = Elements |
Implementation of NodeInterface. | |
static size_t constexpr | LinkCount = false |
handle the expression as a leaf node. | |
Protected Member Functions | |
inlineImpl & | cast () |
Cast to implementation. | |
inlineImpl const & | cast () const |
Cast to implementation. | |
![]() | |
inlineImpl const & | cast () const |
Cast to implementation. | |
Defines an aggregated type via an array and implements the ExpressionInterface.
See AggregatedActiveType for details.
T_Real | Real value of the aggregated type. |
T_InnerActiveType | CoDiPack type that composes the aggregated type. |
T_Impl | The final implementation of the aggregated type. |
T_isStatic | If the aggregated type is created in a static context. |
using codi::AggregatedActiveTypeBase< T_Real, T_InnerActiveType, T_Impl, T_isStatic >::ADLogic = Tape |
AD logic that governs the expression. Needs to be the same for all inputs of the expression.
using codi::AggregatedActiveTypeBase< T_Real, T_InnerActiveType, T_Impl, T_isStatic >::InnerActiveType |
using codi::AggregatedActiveTypeBase< T_Real, T_InnerActiveType, T_Impl, T_isStatic >::StoreAs = typename std::conditional<isStatic, Impl, Impl const&>::type |
Implementation of ExpressionInterface.
Defines how this expression is stored in an expression tree.
|
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>. |
Calls Traits::adjointOfConstructor.
|
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> . |
|
inline |
an expression.
Get the argument for the specific link. Usually
|
inlinestatic |
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.
|
staticconstexpr |
Implementation of NodeInterface.
handle the expression as a leaf node.
Number of links the expression has. Zero will