CoDiPack  3.0.0
A Code Differentiation Package
SciComp TU Kaiserslautern
Loading...
Searching...
No Matches
codi::ActiveComplex< T_InnerActive, T_Impl > Struct Template Reference

#include <stdComplex.hpp>

Inheritance diagram for codi::ActiveComplex< T_InnerActive, T_Impl >:

Public Types

using AssignComplex
 
using AssignReal
 
using Base = AggregatedActiveType<Real, InnerActive, Impl>
 Abbreviation for the base class.
 
using Impl = ResolveSelf<T_Impl, ActiveComplex>
 See ActiveComplex.
 
using InnerActive = T_InnerActive
 See ActiveComplex.
 
using InnerReal = typename InnerActive::Real
 Inner real value.
 
using PassiveInnerReal = RealTraits::PassiveReal<InnerReal>
 Passive inner value.
 
using Real = std::complex<InnerReal>
 Complex value with the inner real.
 
using value_type = InnerActive
 std::complex interface.
 
- Public Types inherited from codi::AggregatedActiveType< std::complex< T_InnerActive::Real >, T_InnerActive, ResolveSelf< T_Impl, ActiveComplex< T_InnerActive, T_Impl > > >
using Base
 Abbreviation for base class.
 
using Impl
 See AggregatedActiveType.
 
using InnerActiveType
 See AggregatedActiveType.
 
using PassiveReal
 Passive value type of the real.
 
using Real
 See AggregatedActiveType.
 
using Traits
 The traits for the aggregated type.
 
- Public Types inherited from codi::AggregatedActiveTypeBase< std::complex< T_InnerActive::Real >, T_InnerActive, T_Impl, false >
using ADLogic
 AD logic that governs the expression. Needs to be the same for all inputs of the expression.
 
using Impl
 See AggregatedActiveTypeBase.
 
using InnerActiveType
 See AggregatedActiveTypeBase.
 
using InnerIdentifier
 Identifier of the underlying tape.
 
using InnerReal
 Inner real type of the active type.
 
using Real
 See AggregatedActiveTypeBase.
 
using StoreAs
 Implementation of ExpressionInterface.
 
using Tape
 The tape of the inner active type.
 
using Traits
 The traits for the aggregated type.
 
- Public Types inherited from codi::ExpressionInterface< std::complex< T_InnerActive::Real >, T_Impl >
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< T_Impl >
using Impl = T_Impl
 See NodeInterface.
 
- Public Types inherited from codi::ExpressionMemberOperations< std::complex< T_InnerActive::Real >, T_Impl >
using Impl
 See ExpressionMemberOperations.
 
using Real
 See ExpressionMemberOperations.
 
- Public Types inherited from codi::AssignmentOperators< T_InnerActive::Real, false, ResolveSelf< T_Impl, ActiveComplex< T_InnerActive, T_Impl > > >
using Base
 
using Impl
 See AssignmentOperators.
 
using PassiveReal
 Basic computation type.
 
using Real
 See AssignmentOperators.
 
- Public Types inherited from codi::AssignmentOperatorsPassiveJacobianOptimization< T_InnerActive::Real, T_JacobianOptimization, T_Impl >
using Impl
 See AssignmentOperators.
 
using PassiveReal
 Basic computation type.
 
using Real
 See AssignmentOperators.
 
- Public Types inherited from codi::AssignmentOperators< std::complex< T_InnerActive::Real >, false, ResolveSelf< T_Impl, ActiveComplex< T_InnerActive, T_Impl > > >
using Base
 
using Impl
 See AssignmentOperators.
 
using PassiveReal
 Basic computation type.
 
using Real
 See AssignmentOperators.
 
- Public Types inherited from codi::AssignmentOperatorsPassiveJacobianOptimization< std::complex< T_InnerActive::Real >, T_JacobianOptimization, T_Impl >
using Impl
 See AssignmentOperators.
 
using PassiveReal
 Basic computation type.
 
using Real
 See AssignmentOperators.
 

Public Member Functions

template<typename ArgR>
 inlineActiveComplex (ExpressionInterface< InnerReal, ArgR > const &argR)
 < Use complex operator /=
 
template<typename ArgR, typename ArgI>
 inlineActiveComplex (ExpressionInterface< InnerReal, ArgR > const &argR, ExpressionInterface< InnerReal, ArgI > const &argI)
 Constructor.
 
template<typename ArgR>
 inlineActiveComplex (ExpressionInterface< InnerReal, ArgR > const &argR, PassiveInnerReal const &argI)
 Constructor.
 
 inlineActiveComplex (PassiveInnerReal const &argR)
 Constructor.
 
template<typename ArgI>
 inlineActiveComplex (PassiveInnerReal const &argR, ExpressionInterface< InnerReal, ArgI > const &argI)
 Constructor.
 
 inlineActiveComplex (PassiveInnerReal const &argR, PassiveInnerReal const &argI)
 Constructor.
 
inlineImpl & operator*= (ExpressionInterface< Real, Rhs > const &rhs)
 < Use complex operator -=
 
inlineImpl & operator*= (ExpressionInterface< Real, Rhs > const &rhs)
 < Use real operator *=
 
inlineImpl & operator*= (PassiveReal const &rhs)
 < Use complex operator -=
 
inlineImpl & operator+= (ExpressionInterface< Real, Rhs > const &rhs)
 < Use Base assign operators.
 
inlineImpl & operator+= (ExpressionInterface< Real, Rhs > const &rhs)
 < Use real operator +=
 
inlineImpl & operator+= (PassiveReal const &rhs)
 < Use Base assign operators.
 
inlineImpl & operator-= (ExpressionInterface< Real, Rhs > const &rhs)
 < Use complex operator +=
 
inlineImpl & operator-= (ExpressionInterface< Real, Rhs > const &rhs)
 < Use real operator -=
 
inlineImpl & operator-= (PassiveReal const &rhs)
 < Use complex operator +=
 
inlineImpl & operator/= (ExpressionInterface< Real, Rhs > const &rhs)
 < Use complex operator *=
 
inlineImpl & operator/= (ExpressionInterface< Real, Rhs > const &rhs)
 < Use real operator /=
 
inlineImpl & operator/= (PassiveReal const &rhs)
 < Use complex operator *=
 
inlineImpl & operator= (AggregatedActiveType const &expr)
 < Use Base constructors.
 
template<typename ArgR>
inlineActiveComplexoperator= (ExpressionInterface< InnerReal, ArgR > const &argR)
 Assign operation for the inner type of the complex number.
 
inlineImpl & operator= (ExpressionInterface< Real, Expr > const &expr)
 < Use Base constructors.
 
inlineActiveComplexoperator= (PassiveInnerReal const &argR)
 Assign operation for the inner passive type.
 
inlineImpl & operator= (PassiveReal const &expr)
 < Use Base constructors.
 
inline ~ActiveComplex ()=default
 Destructor.
 
- Public Member Functions inherited from codi::AggregatedActiveType< std::complex< T_InnerActive::Real >, T_InnerActive, ResolveSelf< T_Impl, ActiveComplex< T_InnerActive, T_Impl > > >
 inlineAggregatedActiveType (AggregatedActiveType const &expr)
 Constructor.
 
 inlineAggregatedActiveType (ExpressionInterface< Real, Expr > const &expr)
 Constructor.
 
 inlineAggregatedActiveType (PassiveReal const &expr)
 Constructor.
 
inlineImpl & operator= (AggregatedActiveType const &expr)
 Assign operation.
 
inlineImpl & operator= (ExpressionInterface< Real, Expr > const &expr)
 Assign operation.
 
inlineImpl & operator= (PassiveReal const &expr)
 Assign operation.
 
inline ~AggregatedActiveType ()=default
 < Use base constructors.
 
- Public Member Functions inherited from codi::AggregatedActiveTypeBase< std::complex< T_InnerActive::Real >, T_InnerActive, T_Impl, false >
inlineInnerReal applyAdjoint (Real const &adjoint) const
 
inlineReal applyTangent (InnerReal const &tangent) const
 
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.
 
- Public Member Functions inherited from codi::ExpressionInterface< std::complex< T_InnerActive::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.
 
inlineauto applyTangent (Tangent const &tangent) const
 
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.
 
- Public Member Functions inherited from codi::AssignmentOperators< T_InnerActive::Real, false, ResolveSelf< T_Impl, ActiveComplex< T_InnerActive, T_Impl > > >
inlineImpl & operator*= (ExpressionInterface< Real, Rhs > const &rhs)
 Operator *= for expressions.
 
inlineImpl & operator*= (PassiveReal const &rhs)
 Operator *= for passive values.
 
inlineImpl & operator+= (ExpressionInterface< Real, Rhs > const &rhs)
 Operator += for expressions.
 
inlineImpl & operator+= (PassiveReal const &rhs)
 Operator += for passive values.
 
inlineImpl & operator+= (PassiveReal const &rhs)
 Operator += for passive values.
 
inlineImpl & operator-= (ExpressionInterface< Real, Rhs > const &rhs)
 Operator -= for expressions.
 
inlineImpl & operator-= (PassiveReal const &rhs)
 Operator -= for passive values.
 
inlineImpl & operator-= (PassiveReal const &rhs)
 Operator -= for passive values.
 
inlineImpl & operator/= (ExpressionInterface< Real, Rhs > const &rhs)
 Operator /= for expressions.
 
inlineImpl & operator/= (PassiveReal const &rhs)
 Operator /= for passive values.
 
- Public Member Functions inherited from codi::AssignmentOperatorsPassiveJacobianOptimization< T_InnerActive::Real, T_JacobianOptimization, T_Impl >
inlineImpl & operator+= (PassiveReal const &rhs)
 Operator += for passive values.
 
inlineImpl & operator-= (PassiveReal const &rhs)
 Operator -= for passive values.
 
- Public Member Functions inherited from codi::AssignmentOperators< std::complex< T_InnerActive::Real >, false, ResolveSelf< T_Impl, ActiveComplex< T_InnerActive, T_Impl > > >
inlineImpl & operator*= (ExpressionInterface< Real, Rhs > const &rhs)
 Operator *= for expressions.
 
inlineImpl & operator*= (PassiveReal const &rhs)
 Operator *= for passive values.
 
inlineImpl & operator+= (ExpressionInterface< Real, Rhs > const &rhs)
 Operator += for expressions.
 
inlineImpl & operator+= (PassiveReal const &rhs)
 Operator += for passive values.
 
inlineImpl & operator+= (PassiveReal const &rhs)
 Operator += for passive values.
 
inlineImpl & operator-= (ExpressionInterface< Real, Rhs > const &rhs)
 Operator -= for expressions.
 
inlineImpl & operator-= (PassiveReal const &rhs)
 Operator -= for passive values.
 
inlineImpl & operator-= (PassiveReal const &rhs)
 Operator -= for passive values.
 
inlineImpl & operator/= (ExpressionInterface< Real, Rhs > const &rhs)
 Operator /= for expressions.
 
inlineImpl & operator/= (PassiveReal const &rhs)
 Operator /= for passive values.
 
- Public Member Functions inherited from codi::AssignmentOperatorsPassiveJacobianOptimization< std::complex< T_InnerActive::Real >, T_JacobianOptimization, T_Impl >
inlineImpl & operator+= (PassiveReal const &rhs)
 Operator += for passive values.
 
inlineImpl & operator-= (PassiveReal const &rhs)
 Operator -= for passive values.
 

Additional Inherited Members

- Static Public Member Functions inherited from codi::AggregatedActiveTypeBase< std::complex< T_InnerActive::Real >, T_InnerActive, T_Impl, false >
static inlinestd::string getMathRep ()
 Get the math symbol of the operation. E.g. + for operators and pow() for functions.
 
- Public Attributes inherited from codi::AggregatedActiveTypeBase< std::complex< T_InnerActive::Real >, T_InnerActive, T_Impl, false >
InnerActiveType values [Elements]
 Array representation.
 
- Static Public Attributes inherited from codi::AggregatedActiveTypeBase< std::complex< T_InnerActive::Real >, T_InnerActive, T_Impl, false >
static int constexpr Elements
 The number of elements in the aggregated type.
 
static bool constexpr isStatic
 See AggregatedActiveTypeBase.
 
static size_t constexpr LinkCount
 Implementation of NodeInterface.
 
static size_t constexpr LinkCount = false
 handle the expression as a leaf node.
 
- Static Public Attributes inherited from codi::AssignmentOperators< T_InnerActive::Real, false, ResolveSelf< T_Impl, ActiveComplex< T_InnerActive, T_Impl > > >
static bool constexpr JacobianOptimization
 See AssignmentOperators.
 
- Static Public Attributes inherited from codi::AssignmentOperatorsPassiveJacobianOptimization< T_InnerActive::Real, T_JacobianOptimization, T_Impl >
static bool constexpr JacobianOptimization
 See AssignmentOperators.
 
- Static Public Attributes inherited from codi::AssignmentOperators< std::complex< T_InnerActive::Real >, false, ResolveSelf< T_Impl, ActiveComplex< T_InnerActive, T_Impl > > >
static bool constexpr JacobianOptimization
 See AssignmentOperators.
 
- Static Public Attributes inherited from codi::AssignmentOperatorsPassiveJacobianOptimization< std::complex< T_InnerActive::Real >, T_JacobianOptimization, T_Impl >
static bool constexpr JacobianOptimization
 See AssignmentOperators.
 
- Protected Member Functions inherited from codi::AggregatedActiveType< std::complex< T_InnerActive::Real >, T_InnerActive, ResolveSelf< T_Impl, ActiveComplex< T_InnerActive, T_Impl > > >
inlinevoid store (ExpressionInterface< Real, Rhs > const &rhs, EventHints::Statement const &eventType)
 Has to be called by an AD variable every time it is assigned.
 
- Protected Member Functions inherited from codi::AggregatedActiveTypeBase< std::complex< T_InnerActive::Real >, T_InnerActive, T_Impl, false >
inlineImpl & cast ()
 Cast to implementation.
 
inlineImpl const & cast () const
 Cast to implementation.
 
- Protected Member Functions inherited from codi::ExpressionMemberOperations< std::complex< T_InnerActive::Real >, T_Impl >
inlineImpl const & cast () const
 Cast to implementation.
 

Detailed Description

template<typename T_InnerActive, typename T_Impl>
struct codi::ActiveComplex< T_InnerActive, T_Impl >

Implementation of AggregatedActiveType for complex types.

This class implements the full interface of std::complex. It does not specialize std::complex directly for active types. This makes it possible to avoid specializations in the std namespace and integrating complex numbers in the expression tree.

Template Parameters
T_InnerActiveThe active type which is used in the inner store.
T_ImplThe implementation if it extends this class, otherwise nothing.

Member Typedef Documentation

◆ AssignComplex

template<typename T_InnerActive, typename T_Impl>
using codi::ActiveComplex< T_InnerActive, T_Impl >::AssignComplex
Initial value:
typename std::conditional< std::is_same< Self, Impl >::value, SelfType, Impl >::type ResolveSelf
Definition self.hpp:55
Provides assignment operators for LhsExpressionInterface implementations.
Definition assignmentOperators.hpp:120

Abbreviations for complex assignments.

◆ AssignReal

template<typename T_InnerActive, typename T_Impl>
using codi::ActiveComplex< T_InnerActive, T_Impl >::AssignReal
Initial value:

Abbreviation for real assignments.

Member Function Documentation

◆ inlineActiveComplex()

template<typename T_InnerActive, typename T_Impl>
template<typename ArgR>
codi::ActiveComplex< T_InnerActive, T_Impl >::inlineActiveComplex ( ExpressionInterface< InnerReal, ArgR > const & argR)
inline

< Use complex operator /=

Constructor.


The documentation for this struct was generated from the following files: