Base class for all CoDiPack lvalue expression. More...
#include <lhsExpressionInterface.hpp>

Public Types | |
| using | Base = ExpressionInterface<T_Real, T_Impl> |
| Base class abbreviation. | |
| using | Gradient = T_Gradient |
| See LhsExpressionInterface. | |
| using | Identifier = typename Tape::Identifier |
| See GradientAccessTapeInterface. | |
| using | Impl = T_Impl |
| See LhsExpressionInterface. | |
| using | PassiveReal = RealTraits::PassiveReal<Real> |
| Basic computation type. | |
| using | Real = T_Real |
| See LhsExpressionInterface. | |
| using | Tape = T_Tape |
| See LhsExpressionInterface. | |
Public Types inherited from codi::ExpressionInterface< T_Real, T_Impl > | |
| 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. | |
Public Types inherited from codi::NodeInterface< T_Impl > | |
| using | Impl = T_Impl |
| See NodeInterface. | |
Public Types inherited from codi::ExpressionMemberOperations< T_Real, T_Impl, typename > | |
| using | Impl = T_Impl |
| See ExpressionMemberOperations. | |
| using | Real = T_Real |
| See ExpressionMemberOperations. | |
Public Member Functions | |
| LhsExpressionInterface ()=default | |
| Constructor. | |
| LhsExpressionInterface (LhsExpressionInterface const &other)=default | |
| Constructor. | |
General implementation | |
| inlineImpl & | cast () |
| Cast to the implementation. | |
| inlineGradient & | gradient () |
| Get the gradient of this lvalue from the tape. | |
| inlineGradient const & | gradient () const |
| Get the gradient of this lvalue from the tape. | |
| inlineGradient | getGradient () const |
| Get the gradient of this lvalue from the tape. | |
| inlinevoid | setGradient (Gradient const &g) |
| Set the gradient of this lvalue in the tape. | |
| inlineReal const & | getValue () const |
| Get the primal value of this lvalue. | |
| inlinevoid | setValue (Real const &v) |
| Set the primal value of this lvalue. | |
| inlineImpl & | operator= (Real const &rhs) |
| Assignment operator for passive values. Calls store on the InternalStatementRecordingTapeInterface. | |
| template<typename U = Real, typename = RealTraits::EnableIfNotPassiveReal<U>> | |
| inlineImpl & | operator= (PassiveReal const &rhs) |
| Assignment operator for passive values. Calls store on the InternalStatementRecordingTapeInterface. | |
| template<typename Rhs> | |
| inlineImpl & | operator= (ExpressionInterface< Real, Rhs > const &rhs) |
| Assignment operator for expressions. Calls store on the InternalStatementRecordingTapeInterface. | |
| template<typename Rhs, typename U = Real, typename = RealTraits::EnableIfNotPassiveReal<U>> | |
| inlineImpl & | operator= (ExpressionInterface< typename U::Real, Rhs > const &rhs) |
| Assignment operator for expressions. Calls store on the InternalStatementRecordingTapeInterface. | |
| inlineImpl & | operator= (LhsExpressionInterface const &rhs) |
| Assignment operator for lhs expressions. Calls store on the InternalStatementRecordingTapeInterface. | |
| template<typename Rhs> | |
| inlineImpl & | operator= (LhsExpressionInterface< Real, Gradient, Tape, Rhs > const &rhs) |
| Assignment operator for lhs expressions. Calls store on the InternalStatementRecordingTapeInterface. | |
| inlineImpl const & | cast () const |
| Cast to the implementation. | |
Public Member Functions inherited from codi::ExpressionInterface< T_Real, T_Impl > | |
| 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 |
Public Member Functions inherited from codi::NodeInterface< T_Impl > | |
| inlineImpl const & | cast () const |
| Cast to the implementation. | |
| template<size_t argNumber> | |
| char const & | getLink () const |
| an expression. | |
Implementation of NodeInterface | |
| static size_t constexpr | LinkCount = 0 |
| handle the expression as a leaf node. | |
| inlinevoid | init (Real const &newValue, EventHints::Statement statementType) |
| inlinevoid | destroy () |
Interface definition | |
| Real const & | value () const |
| Get a constant reference to the lvalue represented by the expression. | |
| Real & | value () |
| Get a reference to the lvalue represented by the expression. | |
| Identifier const & | getIdentifier () const |
| Identifier & | getIdentifier () |
| static Tape & | getTape () |
| Get a reference to the tape which manages this expression. | |
Additional Inherited Members | |
| static size_t constexpr | LinkCount = false |
| handle the expression as a leaf node. | |
Protected Member Functions inherited from codi::ExpressionMemberOperations< T_Real, T_Impl, typename > | |
| inlineImpl const & | cast () const |
| Cast to implementation. | |
Base class for all CoDiPack lvalue expression.
See Expression design documentation for details about the expression system in CoDiPack.
This interface resembles an lvalue in C++.
| T_Real | Original primal value of the statement/expression. |
| T_Gradient | Gradient values computed by the tape implementation. |
| T_Tape | The tape that manages the lvalues of the expression. Minimal interface: InternalStatementRecordingTapeInterface, GradientAccessTapeInterface |
| T_Impl | Class implementing this interface. |
|
inlineprotected |
Helper function to deconstruct the primal value and the identifier by the tape.
To be called in the destructor of the implementing class.
| Identifier & codi::LhsExpressionInterface< T_Real, T_Gradient, T_Tape, T_Impl >::getIdentifier | ( | ) |
Get a reference to the identifier of the tape for this expression. See also Direct data access (Identifier management)
| Identifier const & codi::LhsExpressionInterface< T_Real, T_Gradient, T_Tape, T_Impl >::getIdentifier | ( | ) | const |
Get a constant reference to the identifier of the tape for this expression. See also Direct data access (Identifier management)
|
inlineprotected |
Helper function to initialize the primal value and the identifier by the tape.
To be called in constructors of the implementing class.
|
staticconstexpr |
handle the expression as a leaf node.
Number of links the expression has. Zero will