CppADCodeGen 2.4.3
A C++ Algorithmic Differentiation Package with Source Code Generation
Loading...
Searching...
No Matches
CppAD::cg::Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > Class Template Reference

#include <evaluator_adcg.hpp>

Inheritance diagram for CppAD::cg::Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > >:
Inheritance graph
Collaboration diagram for CppAD::cg::Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > >:
Collaboration graph

Public Types

using ScalarOut = CG<BaseOut>
 
using ActiveOut = CppAD::AD<ScalarOut>
 
using Super = EvaluatorAD<ScalarIn, ScalarOut, Evaluator<ScalarIn, CG<BaseOut>, CppAD::AD<CG<BaseOut> > > >
 
using NodeIn
 
using ArgIn
 
using Base
 

Public Member Functions

 Evaluator (CodeHandler< ScalarIn > &handler)
 
void setPrintFor (bool printFor)
 
bool isPrintFor () const
 
void setPrintForPos (const ActiveOut &pos)
 
const ActiveOutgetPrintForPos () const
 
void setCopyAdCgName (bool adcgName)
 
bool isCopyAdCgName () const
 
void setPrintOutPrintOperations (bool print)
 
bool isPrintOutPrintOperations () const
 
virtual bool addAtomicFunction (size_t id, atomic_base< CG< BaseOut > > &atomic)
 
virtual void addAtomicFunctions (const std::map< size_t, atomic_base< CG< BaseOut > > * > &atomics)
 
size_t getNumberOfEvaluatedAtomics () const
 
bool isUnderEvaluation ()
 
std::vector< CppAD::AD< CG< BaseOut > > > evaluate (ArrayView< const CppAD::AD< CG< BaseOut > > > indepNew, ArrayView< const CG< ScalarIn > > depOld)
 
void evaluate (ArrayView< const CppAD::AD< CG< BaseOut > > > indepNew, ArrayView< CppAD::AD< CG< BaseOut > > > depNew, ArrayView< const CG< ScalarIn > > depOld)
 
void evaluate (const CppAD::AD< CG< BaseOut > > *indepNew, size_t indepSize, CppAD::AD< CG< BaseOut > > *depNew, const CG< ScalarIn > *depOld, size_t depSize)
 

Protected Types

using SourceCodePath
 

Protected Member Functions

void processActiveOut (const OperationNode< ScalarIn > &node, ActiveOut &a)
 
void prepareNewEvaluation ()
 
void evalAtomicOperation (NodeIn &node)
 
void evalAtomicOperation (const NodeIn &node)
 
ActiveOut evalPrint (const NodeIn &node)
 
CppAD::AD< CG< BaseOut > > evalOperation (OperationNode< ScalarIn > &node)
 
CppAD::AD< CG< BaseOut > > evalAssign (const NodeIn &node)
 
CppAD::AD< CG< BaseOut > > evalAbs (const NodeIn &node)
 
CppAD::AD< CG< BaseOut > > evalAcos (const NodeIn &node)
 
CppAD::AD< CG< BaseOut > > evalAdd (const NodeIn &node)
 
CppAD::AD< CG< BaseOut > > evalAlias (const NodeIn &node)
 
CppAD::AD< CG< BaseOut > > evalArrayElement (const NodeIn &node)
 
CppAD::AD< CG< BaseOut > > evalAsin (const NodeIn &node)
 
CppAD::AD< CG< BaseOut > > evalAtan (const NodeIn &node)
 
CppAD::AD< CG< BaseOut > > evalCompareLt (const NodeIn &node)
 
CppAD::AD< CG< BaseOut > > evalCompareLe (const NodeIn &node)
 
CppAD::AD< CG< BaseOut > > evalCompareEq (const NodeIn &node)
 
CppAD::AD< CG< BaseOut > > evalCompareGe (const NodeIn &node)
 
CppAD::AD< CG< BaseOut > > evalCompareGt (const NodeIn &node)
 
CppAD::AD< CG< BaseOut > > evalCompareNe (const NodeIn &node)
 
CppAD::AD< CG< BaseOut > > evalCosh (const NodeIn &node)
 
CppAD::AD< CG< BaseOut > > evalCos (const NodeIn &node)
 
CppAD::AD< CG< BaseOut > > evalDiv (const NodeIn &node)
 
CppAD::AD< CG< BaseOut > > evalExp (const NodeIn &node)
 
CppAD::AD< CG< BaseOut > > evalIndependent (const NodeIn &node)
 
CppAD::AD< CG< BaseOut > > evalLog (const NodeIn &node)
 
CppAD::AD< CG< BaseOut > > evalMul (const NodeIn &node)
 
CppAD::AD< CG< BaseOut > > evalPow (const NodeIn &node)
 
CppAD::AD< CG< BaseOut > > evalSign (const NodeIn &node)
 
CppAD::AD< CG< BaseOut > > evalSinh (const NodeIn &node)
 
CppAD::AD< CG< BaseOut > > evalSin (const NodeIn &node)
 
CppAD::AD< CG< BaseOut > > evalSqrt (const NodeIn &node)
 
CppAD::AD< CG< BaseOut > > evalSub (const NodeIn &node)
 
CppAD::AD< CG< BaseOut > > evalTanh (const NodeIn &node)
 
CppAD::AD< CG< BaseOut > > evalTan (const NodeIn &node)
 
CppAD::AD< CG< BaseOut > > evalMinus (const NodeIn &node)
 
CppAD::AD< CG< BaseOut > > evalUnsupportedOperation (const NodeIn &node)
 
void processActiveOut (const NodeIn &node, CppAD::AD< CG< BaseOut > > &a)
 
CppAD::AD< CG< BaseOut > > evalArg (const std::vector< Argument< ScalarIn > > &args, size_t pos)
 
CppAD::AD< CG< BaseOut > > evalArg (const Argument< ScalarIn > &arg, size_t pos)
 
void clear ()
 
void analyzeOutIndeps (const CppAD::AD< CG< BaseOut > > *indep, size_t n)
 
CppAD::AD< CG< BaseOut > > evalCG (const CG< ScalarIn > &dep)
 
const CppAD::AD< CG< BaseOut > > & evalOperations (OperationNode< ScalarIn > &node)
 
CppAD::AD< CG< BaseOut > > * saveEvaluation (const OperationNode< ScalarIn > &node, CppAD::AD< CG< BaseOut > > &&result)
 
std::vector< CppAD::AD< CG< BaseOut > > > & evalArrayCreationOperation (const OperationNode< ScalarIn > &node)
 
std::vector< CppAD::AD< CG< BaseOut > > > & evalSparseArrayCreationOperation (const OperationNode< ScalarIn > &node)
 

Protected Attributes

bool printFor_
 
ActiveOut printForPos_
 
bool adcgName_
 
std::set< NodeIn * > evalsAtomic_
 
std::map< size_t, CppAD::atomic_base< ScalarOut > * > atomicFunctions_
 
bool printOutPriOperations_
 
CodeHandler< ScalarIn > & handler_
 
const CppAD::AD< CG< BaseOut > > * indep_
 
CodeHandlerVector< ScalarIn, std::unique_ptr< CppAD::AD< CG< BaseOut > > > > evals_
 
std::map< size_t, std::vector< CppAD::AD< CG< BaseOut > > > * > evalsArrays_
 
std::map< size_t, std::vector< CppAD::AD< CG< BaseOut > > > * > evalsSparseArrays_
 
bool underEval_
 
size_t depth_
 
SourceCodePath path_
 

Detailed Description

template<class ScalarIn, class BaseOut>
class CppAD::cg::Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > >

Specialization of class Evaluator for an output active type of AD<CG<Base>>

Definition at line 25 of file evaluator_adcg.hpp.

Member Typedef Documentation

◆ ActiveOut

template<class ScalarIn , class BaseOut >
using CppAD::cg::Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > >::ActiveOut = CppAD::AD<ScalarOut>

Definition at line 33 of file evaluator_adcg.hpp.

◆ ArgIn

using CppAD::cg::EvaluatorAD< ScalarIn, CG< BaseOut >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::ArgIn
inherited

Definition at line 37 of file evaluator_ad.hpp.

◆ Base

using CppAD::cg::EvaluatorOperations< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::Base
inherited

Definition at line 352 of file evaluator.hpp.

◆ NodeIn

using CppAD::cg::EvaluatorAD< ScalarIn, CG< BaseOut >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::NodeIn
inherited

Definition at line 36 of file evaluator_ad.hpp.

◆ ScalarOut

template<class ScalarIn , class BaseOut >
using CppAD::cg::Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > >::ScalarOut = CG<BaseOut>

Definition at line 32 of file evaluator_adcg.hpp.

◆ SourceCodePath

using CppAD::cg::EvaluatorBase< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::SourceCodePath
protectedinherited

Definition at line 48 of file evaluator.hpp.

◆ Super

template<class ScalarIn , class BaseOut >
using CppAD::cg::Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > >::Super = EvaluatorAD<ScalarIn, ScalarOut, Evaluator<ScalarIn, CG<BaseOut>, CppAD::AD<CG<BaseOut> > > >

Definition at line 34 of file evaluator_adcg.hpp.

Constructor & Destructor Documentation

◆ Evaluator()

template<class ScalarIn , class BaseOut >
CppAD::cg::Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > >::Evaluator ( CodeHandler< ScalarIn > & handler)
inline

Definition at line 58 of file evaluator_adcg.hpp.

◆ ~Evaluator()

template<class ScalarIn , class BaseOut >
virtual CppAD::cg::Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > >::~Evaluator ( )
inlinevirtual

Definition at line 65 of file evaluator_adcg.hpp.

Member Function Documentation

◆ addAtomicFunction()

virtual bool CppAD::cg::EvaluatorAD< ScalarIn, CG< BaseOut >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::addAtomicFunction ( size_t id,
atomic_base< CG< BaseOut > > & atomic )
inlinevirtualinherited

Provides an atomic function.

Parameters
idThe atomic function ID
atomicThe atomic function
Returns
True if an atomic function with the same ID was already defined, false otherwise.

Definition at line 83 of file evaluator_ad.hpp.

◆ addAtomicFunctions()

virtual void CppAD::cg::EvaluatorAD< ScalarIn, CG< BaseOut >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::addAtomicFunctions ( const std::map< size_t, atomic_base< CG< BaseOut > > * > & atomics)
inlinevirtualinherited

Definition at line 89 of file evaluator_ad.hpp.

◆ analyzeOutIndeps()

void CppAD::cg::EvaluatorBase< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::analyzeOutIndeps ( const CppAD::AD< CG< BaseOut > > * indep,
size_t n )
inlineprotectedinherited

Definition at line 211 of file evaluator.hpp.

◆ clear()

void CppAD::cg::EvaluatorBase< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::clear ( )
inlineprotectedinherited

clean-up

Definition at line 197 of file evaluator.hpp.

◆ evalAbs()

CppAD::AD< CG< BaseOut > > CppAD::cg::EvaluatorOperations< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::evalAbs ( const NodeIn & node)
inlineprotectedinherited

Definition at line 487 of file evaluator.hpp.

◆ evalAcos()

CppAD::AD< CG< BaseOut > > CppAD::cg::EvaluatorOperations< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::evalAcos ( const NodeIn & node)
inlineprotectedinherited

Definition at line 493 of file evaluator.hpp.

◆ evalAdd()

CppAD::AD< CG< BaseOut > > CppAD::cg::EvaluatorOperations< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::evalAdd ( const NodeIn & node)
inlineprotectedinherited

Definition at line 499 of file evaluator.hpp.

◆ evalAlias()

CppAD::AD< CG< BaseOut > > CppAD::cg::EvaluatorOperations< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::evalAlias ( const NodeIn & node)
inlineprotectedinherited

Definition at line 505 of file evaluator.hpp.

◆ evalArg() [1/2]

CppAD::AD< CG< BaseOut > > CppAD::cg::EvaluatorBase< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::evalArg ( const Argument< ScalarIn > & arg,
size_t pos )
inlineprotectedinherited

Definition at line 364 of file evaluator.hpp.

◆ evalArg() [2/2]

CppAD::AD< CG< BaseOut > > CppAD::cg::EvaluatorBase< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::evalArg ( const std::vector< Argument< ScalarIn > > & args,
size_t pos )
inlineprotectedinherited

Definition at line 364 of file evaluator.hpp.

◆ evalArrayCreationOperation()

std::vector< CppAD::AD< CG< BaseOut > > > & CppAD::cg::EvaluatorBase< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::evalArrayCreationOperation ( const OperationNode< ScalarIn > & node)
inlineprotectedinherited

Definition at line 281 of file evaluator.hpp.

◆ evalArrayElement()

CppAD::AD< CG< BaseOut > > CppAD::cg::EvaluatorOperations< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::evalArrayElement ( const NodeIn & node)
inlineprotectedinherited

Definition at line 511 of file evaluator.hpp.

◆ evalAsin()

CppAD::AD< CG< BaseOut > > CppAD::cg::EvaluatorOperations< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::evalAsin ( const NodeIn & node)
inlineprotectedinherited

Definition at line 527 of file evaluator.hpp.

◆ evalAssign()

CppAD::AD< CG< BaseOut > > CppAD::cg::EvaluatorOperations< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::evalAssign ( const NodeIn & node)
inlineprotectedinherited

Definition at line 481 of file evaluator.hpp.

◆ evalAtan()

CppAD::AD< CG< BaseOut > > CppAD::cg::EvaluatorOperations< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::evalAtan ( const NodeIn & node)
inlineprotectedinherited

Definition at line 533 of file evaluator.hpp.

◆ evalAtomicOperation() [1/2]

void CppAD::cg::EvaluatorAD< ScalarIn, CG< BaseOut >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::evalAtomicOperation ( NodeIn & node)
inlineprotectedinherited
Exceptions
CGExceptionon an internal evaluation error
Note
overrides the default evalAtomicOperation() even though this method is not virtual (hides a method in EvaluatorOperations)

Definition at line 131 of file evaluator_ad.hpp.

◆ evalAtomicOperation() [2/2]

void CppAD::cg::EvaluatorOperations< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::evalAtomicOperation ( const NodeIn & node)
inlineprotectedinherited

Definition at line 680 of file evaluator.hpp.

◆ evalCG()

CppAD::AD< CG< BaseOut > > CppAD::cg::EvaluatorBase< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::evalCG ( const CG< ScalarIn > & dep)
inlineprotectedinherited

Definition at line 216 of file evaluator.hpp.

◆ evalCompareEq()

CppAD::AD< CG< BaseOut > > CppAD::cg::EvaluatorOperations< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::evalCompareEq ( const NodeIn & node)
inlineprotectedinherited

Definition at line 551 of file evaluator.hpp.

◆ evalCompareGe()

CppAD::AD< CG< BaseOut > > CppAD::cg::EvaluatorOperations< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::evalCompareGe ( const NodeIn & node)
inlineprotectedinherited

Definition at line 557 of file evaluator.hpp.

◆ evalCompareGt()

CppAD::AD< CG< BaseOut > > CppAD::cg::EvaluatorOperations< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::evalCompareGt ( const NodeIn & node)
inlineprotectedinherited

Definition at line 563 of file evaluator.hpp.

◆ evalCompareLe()

CppAD::AD< CG< BaseOut > > CppAD::cg::EvaluatorOperations< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::evalCompareLe ( const NodeIn & node)
inlineprotectedinherited

Definition at line 545 of file evaluator.hpp.

◆ evalCompareLt()

CppAD::AD< CG< BaseOut > > CppAD::cg::EvaluatorOperations< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::evalCompareLt ( const NodeIn & node)
inlineprotectedinherited

Definition at line 539 of file evaluator.hpp.

◆ evalCompareNe()

CppAD::AD< CG< BaseOut > > CppAD::cg::EvaluatorOperations< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::evalCompareNe ( const NodeIn & node)
inlineprotectedinherited

Definition at line 569 of file evaluator.hpp.

◆ evalCos()

CppAD::AD< CG< BaseOut > > CppAD::cg::EvaluatorOperations< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::evalCos ( const NodeIn & node)
inlineprotectedinherited

Definition at line 581 of file evaluator.hpp.

◆ evalCosh()

CppAD::AD< CG< BaseOut > > CppAD::cg::EvaluatorOperations< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::evalCosh ( const NodeIn & node)
inlineprotectedinherited

Definition at line 575 of file evaluator.hpp.

◆ evalDiv()

CppAD::AD< CG< BaseOut > > CppAD::cg::EvaluatorOperations< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::evalDiv ( const NodeIn & node)
inlineprotectedinherited

Definition at line 587 of file evaluator.hpp.

◆ evalExp()

CppAD::AD< CG< BaseOut > > CppAD::cg::EvaluatorOperations< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::evalExp ( const NodeIn & node)
inlineprotectedinherited

Definition at line 593 of file evaluator.hpp.

◆ evalIndependent()

CppAD::AD< CG< BaseOut > > CppAD::cg::EvaluatorOperations< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::evalIndependent ( const NodeIn & node)
inlineprotectedinherited

Definition at line 599 of file evaluator.hpp.

◆ evalLog()

CppAD::AD< CG< BaseOut > > CppAD::cg::EvaluatorOperations< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::evalLog ( const NodeIn & node)
inlineprotectedinherited

Definition at line 604 of file evaluator.hpp.

◆ evalMinus()

CppAD::AD< CG< BaseOut > > CppAD::cg::EvaluatorOperations< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::evalMinus ( const NodeIn & node)
inlineprotectedinherited

Definition at line 670 of file evaluator.hpp.

◆ evalMul()

CppAD::AD< CG< BaseOut > > CppAD::cg::EvaluatorOperations< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::evalMul ( const NodeIn & node)
inlineprotectedinherited

Definition at line 610 of file evaluator.hpp.

◆ evalOperation()

CppAD::AD< CG< BaseOut > > CppAD::cg::EvaluatorOperations< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::evalOperation ( OperationNode< ScalarIn > & node)
inlineprotectedinherited

Clones a node with the new type. Override this method to add a custom node generation behaviour which does not follow the original operation graph.

Parameters
nodethe original node
Returns
the clone of the original node

Definition at line 374 of file evaluator.hpp.

◆ evalOperations()

const CppAD::AD< CG< BaseOut > > & CppAD::cg::EvaluatorBase< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::evalOperations ( OperationNode< ScalarIn > & node)
inlineprotectedinherited

Definition at line 242 of file evaluator.hpp.

◆ evalPow()

CppAD::AD< CG< BaseOut > > CppAD::cg::EvaluatorOperations< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::evalPow ( const NodeIn & node)
inlineprotectedinherited

Definition at line 616 of file evaluator.hpp.

◆ evalPrint()

ActiveOut CppAD::cg::EvaluatorAD< ScalarIn, CG< BaseOut >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::evalPrint ( const NodeIn & node)
inlineprotectedinherited
Note
overrides the default evalPrint() even though this method is not virtual (hides a method in EvaluatorOperations)

Definition at line 181 of file evaluator_ad.hpp.

◆ evalSign()

CppAD::AD< CG< BaseOut > > CppAD::cg::EvaluatorOperations< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::evalSign ( const NodeIn & node)
inlineprotectedinherited

Definition at line 628 of file evaluator.hpp.

◆ evalSin()

CppAD::AD< CG< BaseOut > > CppAD::cg::EvaluatorOperations< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::evalSin ( const NodeIn & node)
inlineprotectedinherited

Definition at line 640 of file evaluator.hpp.

◆ evalSinh()

CppAD::AD< CG< BaseOut > > CppAD::cg::EvaluatorOperations< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::evalSinh ( const NodeIn & node)
inlineprotectedinherited

Definition at line 634 of file evaluator.hpp.

◆ evalSparseArrayCreationOperation()

std::vector< CppAD::AD< CG< BaseOut > > > & CppAD::cg::EvaluatorBase< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::evalSparseArrayCreationOperation ( const OperationNode< ScalarIn > & node)
inlineprotectedinherited

Definition at line 306 of file evaluator.hpp.

◆ evalSqrt()

CppAD::AD< CG< BaseOut > > CppAD::cg::EvaluatorOperations< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::evalSqrt ( const NodeIn & node)
inlineprotectedinherited

Definition at line 646 of file evaluator.hpp.

◆ evalSub()

CppAD::AD< CG< BaseOut > > CppAD::cg::EvaluatorOperations< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::evalSub ( const NodeIn & node)
inlineprotectedinherited

Definition at line 652 of file evaluator.hpp.

◆ evalTan()

CppAD::AD< CG< BaseOut > > CppAD::cg::EvaluatorOperations< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::evalTan ( const NodeIn & node)
inlineprotectedinherited

Definition at line 664 of file evaluator.hpp.

◆ evalTanh()

CppAD::AD< CG< BaseOut > > CppAD::cg::EvaluatorOperations< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::evalTanh ( const NodeIn & node)
inlineprotectedinherited

Definition at line 658 of file evaluator.hpp.

◆ evaluate() [1/3]

std::vector< CppAD::AD< CG< BaseOut > > > CppAD::cg::EvaluatorBase< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::evaluate ( ArrayView< const CppAD::AD< CG< BaseOut > > > indepNew,
ArrayView< const CG< ScalarIn > > depOld )
inlineinherited

Performs all the operations required to calculate the dependent variables with a (potentially) new data type

Parameters
indepNewThe new independent variables.
depOldDependent variable vector representing the operations that are going to be executed to determine the new variables (all variables must belong to the same code handler)
Returns
The dependent variable values
Exceptions
CGExceptionon error (such as an unhandled operation type)

Definition at line 93 of file evaluator.hpp.

◆ evaluate() [2/3]

void CppAD::cg::EvaluatorBase< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::evaluate ( ArrayView< const CppAD::AD< CG< BaseOut > > > indepNew,
ArrayView< CppAD::AD< CG< BaseOut > > > depNew,
ArrayView< const CG< ScalarIn > > depOld )
inlineinherited

Performs all the operations required to calculate the dependent variables with a (potentially) new data type

Parameters
indepNewThe new independent variables.
depNewThe new dependent variable vector to be computed.
depOldDependent variable vector representing the operations that are going to be executed to determine the new variables (all variables must belong to the same code handler)
Exceptions
CGExceptionon error (such as an different sizes of depNew and depOld or an unhandled operation type)

Definition at line 114 of file evaluator.hpp.

◆ evaluate() [3/3]

void CppAD::cg::EvaluatorBase< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::evaluate ( const CppAD::AD< CG< BaseOut > > * indepNew,
size_t indepSize,
CppAD::AD< CG< BaseOut > > * depNew,
const CG< ScalarIn > * depOld,
size_t depSize )
inlineinherited

Performs all the operations required to calculate the dependent variables with a (potentially) new data type

Parameters
indepNewThe new independent variables.
indepSizeThe size of the array of independent variables.
depNewThe new dependent variable vector that will be created.
depOldDependent variable vector representing the operations that are going to be executed to determine the new variables (all variables must belong to the same code handler)
depSizeThe size of the array of dependent variables.
Exceptions
CGExceptionon error (such as an unhandled operation type)

Definition at line 137 of file evaluator.hpp.

◆ evalUnsupportedOperation()

CppAD::AD< CG< BaseOut > > CppAD::cg::EvaluatorOperations< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::evalUnsupportedOperation ( const NodeIn & node)
inlineprotectedinherited

Definition at line 676 of file evaluator.hpp.

◆ getNumberOfEvaluatedAtomics()

size_t CppAD::cg::EvaluatorAD< ScalarIn, CG< BaseOut >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::getNumberOfEvaluatedAtomics ( ) const
inlineinherited

Provides the number of atomic function evaluations. The same function can be considered more than once.

Returns
the number of atomic functions evaluations.

Definition at line 104 of file evaluator_ad.hpp.

◆ getPrintForPos()

template<class ScalarIn , class BaseOut >
const ActiveOut & CppAD::cg::Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > >::getPrintForPos ( ) const
inline

Whenever printFor_ is set to true it will add a CppAD::PrintFor(pos, "", var, name) to every variable with a name so that names can be recovered using a OperationNodeNameStreambuf. This method provides the pos value used in CppAD::PrintFor.

Definition at line 105 of file evaluator_adcg.hpp.

◆ isCopyAdCgName()

template<class ScalarIn , class BaseOut >
bool CppAD::cg::Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > >::isCopyAdCgName ( ) const
inline

Whenever set to true it will copy the name in original operation nodes into new operation nodes created in AD<CG>. The default value is true.

Definition at line 122 of file evaluator_adcg.hpp.

◆ isPrintFor()

template<class ScalarIn , class BaseOut >
bool CppAD::cg::Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > >::isPrintFor ( ) const
inline

true if a CppAD::PrintFor(pos, "", var, name) will be added to every variable with a name so that names can be recovered using a OperationNodeNameStreambuf. The default value is false.

Definition at line 83 of file evaluator_adcg.hpp.

◆ isPrintOutPrintOperations()

bool CppAD::cg::EvaluatorAD< ScalarIn, CG< BaseOut >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::isPrintOutPrintOperations ( ) const
inlineinherited

Whether or not the nodes with an operation type 'Pri' are printed out during the evaluation.

Definition at line 71 of file evaluator_ad.hpp.

◆ isUnderEvaluation()

bool CppAD::cg::EvaluatorBase< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::isUnderEvaluation ( )
inlineinherited
Returns
true if this Evaluator is currently being used.

Definition at line 78 of file evaluator.hpp.

◆ prepareNewEvaluation()

void CppAD::cg::EvaluatorAD< ScalarIn, CG< BaseOut >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::prepareNewEvaluation ( )
inlineprotectedinherited
Note
overrides the default prepareNewEvaluation() even though this method is not virtual (hides a method in EvaluatorBase)

Do not place this in clear() so that it is possible to determine the number of atomic function evaluations after the evaluation has ended.

Definition at line 114 of file evaluator_ad.hpp.

◆ processActiveOut() [1/2]

template<class ScalarIn , class BaseOut >
void CppAD::cg::Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > >::processActiveOut ( const OperationNode< ScalarIn > & node,
ActiveOut & a )
inlineprotected
Note
overrides the default processActiveOut() even though this method is not virtual (hides a method in EvaluatorOperations)

Definition at line 132 of file evaluator_adcg.hpp.

◆ processActiveOut() [2/2]

void CppAD::cg::EvaluatorOperations< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::processActiveOut ( const NodeIn & node,
CppAD::AD< CG< BaseOut > > & a )
inlineprotectedinherited

Definition at line 684 of file evaluator.hpp.

◆ saveEvaluation()

CppAD::AD< CG< BaseOut > > * CppAD::cg::EvaluatorBase< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::saveEvaluation ( const OperationNode< ScalarIn > & node,
CppAD::AD< CG< BaseOut > > && result )
inlineprotectedinherited

Definition at line 267 of file evaluator.hpp.

◆ setCopyAdCgName()

template<class ScalarIn , class BaseOut >
void CppAD::cg::Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > >::setCopyAdCgName ( bool adcgName)
inline

Whenever set to true it will copy the name in original operation nodes into new operation nodes created in AD<CG>.

Definition at line 113 of file evaluator_adcg.hpp.

◆ setPrintFor()

template<class ScalarIn , class BaseOut >
void CppAD::cg::Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > >::setPrintFor ( bool printFor)
inline

Whenever set to true it will add a CppAD::PrintFor(pos, "", var, name) to every variable with a name so that names can be recovered using a OperationNodeNameStreambuf.

Definition at line 73 of file evaluator_adcg.hpp.

◆ setPrintForPos()

template<class ScalarIn , class BaseOut >
void CppAD::cg::Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > >::setPrintForPos ( const ActiveOut & pos)
inline

Whenever printFor_ is set to true it will add a CppAD::PrintFor(pos, "", var, name) to every variable with a name so that names can be recovered using a OperationNodeNameStreambuf. This method sets the pos value used in CppAD::PrintFor.

Definition at line 94 of file evaluator_adcg.hpp.

◆ setPrintOutPrintOperations()

void CppAD::cg::EvaluatorAD< ScalarIn, CG< BaseOut >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::setPrintOutPrintOperations ( bool print)
inlineinherited

Defines whether or not to print out the nodes with an operation type 'Pri' during the evaluation.

Definition at line 63 of file evaluator_ad.hpp.

Member Data Documentation

◆ adcgName_

template<class ScalarIn , class BaseOut >
bool CppAD::cg::Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > >::adcgName_
protected

Whenever set to true it will copy the name in original operation nodes into new operation nodes created in AD<CG>.

Definition at line 55 of file evaluator_adcg.hpp.

◆ atomicFunctions_

template<class ScalarIn , class BaseOut >
std::map<size_t, CppAD::atomic_base<ScalarOut>* > CppAD::cg::EvaluatorAD< ScalarIn, ScalarOut, FinalEvaluatorType >::atomicFunctions_
protected

Definition at line 44 of file evaluator_ad.hpp.

◆ depth_

size_t CppAD::cg::EvaluatorBase< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::depth_
protectedinherited

Definition at line 56 of file evaluator.hpp.

◆ evals_

CodeHandlerVector<ScalarIn, std::unique_ptr<CppAD::AD< CG< BaseOut > >> > CppAD::cg::EvaluatorBase< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::evals_
protectedinherited

Definition at line 52 of file evaluator.hpp.

◆ evalsArrays_

std::map<size_t, std::vector<CppAD::AD< CG< BaseOut > >>* > CppAD::cg::EvaluatorBase< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::evalsArrays_
protectedinherited

Definition at line 53 of file evaluator.hpp.

◆ evalsAtomic_

template<class ScalarIn , class BaseOut >
std::set<NodeIn*> CppAD::cg::EvaluatorAD< ScalarIn, ScalarOut, FinalEvaluatorType >::evalsAtomic_
protected

Definition at line 43 of file evaluator_ad.hpp.

◆ evalsSparseArrays_

std::map<size_t, std::vector<CppAD::AD< CG< BaseOut > >>* > CppAD::cg::EvaluatorBase< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::evalsSparseArrays_
protectedinherited

Definition at line 54 of file evaluator.hpp.

◆ handler_

CodeHandler<ScalarIn>& CppAD::cg::EvaluatorBase< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::handler_
protectedinherited

Definition at line 50 of file evaluator.hpp.

◆ indep_

const CppAD::AD< CG< BaseOut > >* CppAD::cg::EvaluatorBase< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::indep_
protectedinherited

Definition at line 51 of file evaluator.hpp.

◆ path_

SourceCodePath CppAD::cg::EvaluatorBase< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::path_
protectedinherited

Definition at line 57 of file evaluator.hpp.

◆ printFor_

template<class ScalarIn , class BaseOut >
bool CppAD::cg::Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > >::printFor_
protected

Whenever set to true it will add a CppAD::PrintFor(0, "", var, name) to every variable with a name so that names can be recovered using a OperationNodeNameStreambuf.

Definition at line 46 of file evaluator_adcg.hpp.

◆ printForPos_

template<class ScalarIn , class BaseOut >
ActiveOut CppAD::cg::Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > >::printForPos_
protected

Pos value used in CppAD::PrintFor(pos, ...)

Definition at line 50 of file evaluator_adcg.hpp.

◆ printOutPriOperations_

bool CppAD::cg::EvaluatorAD< ScalarIn, CG< BaseOut >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::printOutPriOperations_
protectedinherited

Whether or not the nodes with an operation type 'Pri' are printed out during the evaluation.

Definition at line 49 of file evaluator_ad.hpp.

◆ underEval_

bool CppAD::cg::EvaluatorBase< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > >, Evaluator< ScalarIn, CG< BaseOut >, CppAD::AD< CG< BaseOut > > > >::underEval_
protectedinherited

Definition at line 55 of file evaluator.hpp.


The documentation for this class was generated from the following file: