CppAD: A C++ Algorithmic Differentiation Package  20171217
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
template<class Base >
template<class VectorSet >
VectorSet CppAD::ADFun< Base >::ForSparseHes ( const VectorSet &  r,
const VectorSet &  s 
)

User API for Hessian sparsity patterns using reverse mode.

The C++ source code corresponding to this operation is

     h = f.ForSparseHes(q, r)
Template Parameters
Baseis the base type for this recording.
VectorSetis a simple vector with elements of type bool or std::set<size_t>.
Parameters
ris a vector with size n that specifies the sparsity pattern for the diagonal of the matrix $ R $, where n is the number of independent variables corresponding to the operation sequence stored in play.
sis a vector with size m that specifies the sparsity pattern for the vector $ S $, where m is the number of dependent variables corresponding to the operation sequence stored in play.
Returns
The return vector is a sparsity pattern for $ H(x) $

\[ H(x) = R^T ( S * F)^{(2)} (x) R \]

where $ F $ is the function corresponding to the operation sequence and x is any argument value.

Definition at line 449 of file for_sparse_hes.hpp.