CppADCodeGen 2.4.3
A C++ Algorithmic Differentiation Package with Source Code Generation
Loading...
Searching...
No Matches
CppAD::cg::SparseForjacHessianWorkHes Class Reference

#include <sparse_forjac_hessian.hpp>

Collaboration diagram for CppAD::cg::SparseForjacHessianWorkHes:
Collaboration graph

Public Member Functions

template<class Base , class VectorSize >
void prepare (const ADFun< Base > &fun, const VectorSize &row, const VectorSize &col)
 
void clear ()
 inform CppAD that this information needs to be recomputed
 

Public Attributes

std::vector< size_t > r_sort
 version of user r array sorted by row or column
 
std::vector< size_t > c_sort
 version of user c array sorted by row or column
 
std::vector< size_t > k_sort
 mapping from sorted array indices to user array indices
 
size_t K
 number elements in the user sparse Hessian
 

Detailed Description

class used by SparseForJacHessian to hold information relative to the Hessian so it does not need to be recomputed.

Definition at line 108 of file sparse_forjac_hessian.hpp.

Member Function Documentation

◆ clear()

void CppAD::cg::SparseForjacHessianWorkHes::clear ( )
inline

inform CppAD that this information needs to be recomputed

Definition at line 167 of file sparse_forjac_hessian.hpp.

Referenced by CppAD::cg::SparseForjacHessianWork::clear().

◆ prepare()

template<class Base , class VectorSize >
void CppAD::cg::SparseForjacHessianWorkHes::prepare ( const ADFun< Base > &  fun,
const VectorSize &  row,
const VectorSize &  col 
)
inline

Code adapted from ADFun::SparseHessian()

Definition at line 120 of file sparse_forjac_hessian.hpp.

Member Data Documentation

◆ c_sort

std::vector<size_t> CppAD::cg::SparseForjacHessianWorkHes::c_sort

version of user c array sorted by row or column

Definition at line 113 of file sparse_forjac_hessian.hpp.

Referenced by clear(), and prepare().

◆ K

size_t CppAD::cg::SparseForjacHessianWorkHes::K

number elements in the user sparse Hessian

Definition at line 117 of file sparse_forjac_hessian.hpp.

Referenced by prepare().

◆ k_sort

std::vector<size_t> CppAD::cg::SparseForjacHessianWorkHes::k_sort

mapping from sorted array indices to user array indices

Definition at line 115 of file sparse_forjac_hessian.hpp.

Referenced by clear(), and prepare().

◆ r_sort

std::vector<size_t> CppAD::cg::SparseForjacHessianWorkHes::r_sort

version of user r array sorted by row or column

Definition at line 111 of file sparse_forjac_hessian.hpp.

Referenced by clear(), and prepare().


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