Represents an operator with two arguments in the expression tree. More...
#include <binaryExpression.hpp>
Public Types | |
using | ArgA = T_ArgA |
See BinaryExpression. | |
using | ArgB = T_ArgB |
See BinaryExpression. | |
using | Operation = T_Operation<Real> |
See BinaryExpression. | |
using | Real = T_Real |
See BinaryExpression. | |
Public Types inherited from codi::ExpressionInterface< T_Real, BinaryExpression< T_Real, T_ArgA, T_ArgB, T_Operation > > | |
using | ActiveResult |
Type into which the expression can be converted. Usually also the type from which it is constructed. | |
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< T_Impl > | |
using | Impl = T_Impl |
See NodeInterface. | |
Public Member Functions | |
template<typename RealA , typename RealB > | |
BinaryExpression (ExpressionInterface< RealA, ArgA > const &argA, ExpressionInterface< RealB, ArgB > const &argB) | |
Constructor. | |
Public Member Functions inherited from codi::ExpressionInterface< T_Real, BinaryExpression< T_Real, T_ArgA, T_ArgB, T_Operation > > | |
Impl const & | cast () const |
Cast to the implementation. | |
ExpressionInterface ()=default | |
Constructor. | |
ExpressionInterface (ExpressionInterface const &)=default | |
Constructor. | |
Real const | getValue () const |
Compute the primal value that is usually evaluated by the statement/expression. | |
Real | getJacobian () const |
Public Member Functions inherited from codi::NodeInterface< T_Impl > | |
Impl const & | cast () const |
Cast to the implementation. | |
template<typename Logic , typename... Args> | |
void | forEachLink (TraversalLogic< Logic > &logic, Args &&... args) const |
Public Attributes | |
ArgA::StoreAs | argA |
First argument of the expression. | |
ArgB::StoreAs | argB |
Second argument of the expression. | |
Real | result |
Precomputed result. | |
Implementation of ExpressionInterface | |
using | StoreAs = BinaryExpression |
Defines how this expression is stored in an expression tree. | |
using | ActiveResult |
Type into which the expression can be converted. Usually also the type from which it is constructed. | |
Real const & | getValue () const |
Compute the primal value that is usually evaluated by the statement/expression. | |
template<size_t argNumber> | |
Real | getJacobian () const |
Implementation of NodeInterface | |
static bool constexpr | EndPoint = false |
If this expression is handled as a leaf in the tree. | |
template<typename Logic , typename... Args> | |
void | forEachLink (TraversalLogic< Logic > &logic, Args &&... args) const |
std::string | getMathRep () const |
Get the math symbol of the binary operation. E.g. + for operators and pow() for functions. | |
template<typename CompileTimeLogic , typename... Args> | |
static CompileTimeLogic::ResultType constexpr | forEachLinkConstExpr (Args &&... args) |
Additional Inherited Members | |
Static Public Member Functions inherited from codi::NodeInterface< T_Impl > | |
template<typename Logic , typename... Args> | |
static Logic::ResultType constexpr | forEachLinkConstExpr (Args &&... args) |
Static Public Attributes inherited from codi::NodeInterface< T_Impl > | |
static bool constexpr | EndPoint = false |
If this expression is handled as a leaf in the tree. | |
Represents an operator with two 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_ArgA | The ExpressionInterface type of the first argument. |
T_ArgB | The ExpressionInterface type of the second argument. |
T_Operation | The logic for computing the primal value and Jacobians. Must implement BinaryOperation. |
using codi::BinaryExpression< T_Real, T_ArgA, T_ArgB, T_Operation >::ActiveResult |
Type into which the expression can be converted. Usually also the type from which it is constructed.
using codi::BinaryExpression< T_Real, T_ArgA, T_ArgB, T_Operation >::StoreAs = BinaryExpression |
Defines how this expression is stored in an expression tree.
|
inline |
Call the link method of the given logic for all arguments (links) of this node (not to be confused with args). Pass args to each call.
|
inlinestaticconstexpr |
Call the link method of the given logic for all arguments (links) of this node (not to be confused with args). Pass args to each call.
|
inline |
|
inline |
Get the math symbol of the binary operation. E.g. +
for operators and pow()
for functions.
|
inline |
Compute the primal value that is usually evaluated by the statement/expression.
|
staticconstexpr |
If this expression is handled as a leaf in the tree.