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 >::RevSparseHes ( size_t  q,
const VectorSet &  s,
bool  transpose = false 
)

User API for Hessian sparsity patterns using reverse mode.

The C++ source code corresponding to this operation is

     h = f.RevSparseHes(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
transposeis true (false) if is is equal to $ H(x) $ ( $ H(x)^T $) where

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

where $ F $ is the function corresponding to the operation sequence and x is any argument value.
qis the value of q in the by the previous call of the form
     f.ForSparseJac(q, r, packed)
The value r in this call is a sparsity pattern for the matrix $ R $. The type of the element of r for the previous call to ForSparseJac must be the same as the type of the elements of s.
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
If transpose is false (true), the return vector is a sparsity pattern for $ H(x) $ ( $ H(x)^T $).

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

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

Definition at line 494 of file rev_sparse_hes.hpp.

Referenced by CppAD::ipopt::solve_callback< Dvector, ADvector, FG_eval >::solve_callback().