|
CppADCodeGen
HEAD
A C++ Algorithmic Differentiation Package with Source Code Generation
|

Public Types | |
| using | CGB = CppAD::cg::CG< Base > |
| using | Arg = Argument< Base > |
| using | VectorSet = std::vector< std::set< size_t > > |
Public Member Functions | |
| LoopFreeModel (ADFun< CGB > *fun, const std::vector< size_t > &dependentOrigIndexes) | |
| LoopFreeModel (const LoopFreeModel< Base > &)=delete | |
| LoopFreeModel & | operator= (const LoopFreeModel< Base > &)=delete |
| ADFun< CGB > & | getTape () const |
| size_t | getTapeDependentCount () const |
| size_t | getTemporaryDependentCount () const |
| size_t | getTapeIndependentCount () const |
| const std::vector< size_t > & | getOrigDependentIndexes () const |
| size_t | getLocalDependentIndex (size_t origI) const |
| void | evalJacobianSparsity () |
| const VectorSet & | getJacobianSparsity () const |
| void | evalHessianSparsity () |
| const VectorSet & | getHessianTempEqsSparsity () const |
| const VectorSet & | getHessianOrigEqsSparsity () const |
| CG< Base > | createConditionalOperation (CodeHandler< Base > &handler, const std::set< size_t > &iterations, size_t iterCount, const CG< Base > &value, IndexOperationNode< Base > &iterationIndexOp) |
| std::map< size_t, std::map< size_t, CGB > > | calculateJacobianHessianUsedByLoops (CodeHandler< Base > &handler, std::map< LoopModel< Base > *, loops::HessianWithLoopsInfo< Base > > &loopHessInfo, const std::vector< CGB > &x, std::vector< CGB > &temps, const VectorSet &noLoopEvalJacSparsity, bool individualColoring) |
| void | calculateHessian4OrignalEquations (const std::vector< CGB > &x, const std::vector< CGB > &w, const VectorSet &noLoopEvalHessSparsity, const std::vector< std::map< size_t, std::set< size_t > > > &noLoopEvalHessLocations, std::vector< CGB > &hess) |
Protected Attributes | |
| ADFun< CGB > *const | fun_ |
| std::vector< size_t > | dependentIndexes_ |
| std::map< size_t, size_t > | dependentOrig2Local |
| VectorSet | jacTapeSparsity_ |
| bool | jacSparsity_ |
| VectorSet | hessTapeTempSparsity_ |
| VectorSet | hessTapeOrigEqSparsity_ |
| bool | hessSparsity_ |
Altered model without the loop equations and with extra dependents for the non-indexed temporary variables used by loops
Definition at line 105 of file declare_cg.hpp.
|
inline |
Creates a model for the non-indexed operations
| fun | |
| dependentOrigIndexes |
Definition at line 69 of file loop_free_model.hpp.
|
inline |
hessian - original equations
Definition at line 348 of file loop_free_model.hpp.
|
inline |
Determines the Hessian for the temporary variables only used by each loop
| loopHessInfo | |
| x | the independent variables |
| temps | |
| noLoopEvalJacSparsity | |
| individualColoring | |
| iterationIndexOp |
Hessian - temporary variables
Some equations are not present in all iterations
Definition at line 235 of file loop_free_model.hpp.
|
inline |
Creates conditional nodes for temporary variables
| handler | source code handler |
| iterations | the iterations where the value should be evaluated |
| iterCount | the number of iteration of the loop |
| value | the value determined inside the loop |
| iterationIndexOp | the iteration index operation for this loop |
must create a conditional element so that this contribution is only evaluated at the relevant iterations
Definition at line 173 of file loop_free_model.hpp.
Referenced by CppAD::cg::LoopFreeModel< Base >::calculateJacobianHessianUsedByLoops().
|
inline |
Provides the dependent variables indexes present in the original model
Definition at line 105 of file loop_free_model.hpp.
|
protected |
The dependent variables in this tape to their original indexes
Definition at line 42 of file loop_free_model.hpp.
Referenced by CppAD::cg::LoopFreeModel< Base >::getOrigDependentIndexes().
|
protected |
The tape
Definition at line 38 of file loop_free_model.hpp.
Referenced by CppAD::cg::LoopFreeModel< Base >::calculateHessian4OrignalEquations(), CppAD::cg::LoopFreeModel< Base >::getOrigDependentIndexes(), and CppAD::cg::LoopFreeModel< Base >::LoopFreeModel().
|
protected |
Hessian sparsity pattern for the original model equations in the tape (ignores the equations for the temporaries)
Definition at line 58 of file loop_free_model.hpp.
Referenced by CppAD::cg::LoopFreeModel< Base >::getOrigDependentIndexes().
|
protected |
Hessian sparsity pattern for equations used to determine the temporaries (ignores the the original model equations)
Definition at line 53 of file loop_free_model.hpp.
Referenced by CppAD::cg::LoopFreeModel< Base >::getOrigDependentIndexes().
|
protected |
Jacobian sparsity pattern of the tape
Definition at line 47 of file loop_free_model.hpp.
Referenced by CppAD::cg::LoopFreeModel< Base >::getOrigDependentIndexes().