CppAD: A C++ Algorithmic Differentiation Package 20110419
template<class Base , class VectorSet , class Sparsity >
void RevSparseHesSet ( size_t  q,
const VectorSet &  s,
VectorSet &  h,
size_t  total_num_var,
CppAD::vector< size_t > &  dep_taddr,
CppAD::vector< size_t > &  ind_taddr,
CppAD::player< Base > &  play,
Sparsity &  for_jac_sparsity 
)

Calculate Hessian sparsity patterns using reverse mode.

The C++ source code corresponding to this operation is

	h = f.RevSparseHes(q, s)
Template Parameters:
Baseis the base type for this recording.
VectorSetis a simple vector with elements of type std::set<size_t>.
Sparsityis either sparse_pack or sparse_set.
Parameters:
qis the value of q in the by the previous call of the form
	f.ForSparseJac(q, r)
The value r in this call is a sparsity pattern for the matrix $ R $.
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.
hthe input value of h must be a vector with size q. On input, each element of h must be an empty set. The input value of its elements does not matter. On output, h is the sparsity pattern for the matrix

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

where $ F $ is the function corresponding to the operation sequence and x is any argument value.
total_num_varis the total number of variables in this recording.
dep_taddrmaps dependendent variable index to the corresponding variable in the tape.
ind_taddrmaps independent variable index to the corresponding variable in the tape.
playis the recording that defines the function we are computing the sparsity pattern for.
for_jac_sparsityis a vector of sets containing the the forward Jacobian sparsity pattern corresponding to $latex R$$ for all of the variables on the tape.

Definition at line 383 of file rev_sparse_hes.hpp.

Referenced by ADFun< Base >::RevSparseHesCase().