CppAD: A C++ Algorithmic Differentiation Package  20171217
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
template<class Vector_set >
void CppAD::local::reverse_sparse_hessian_unary_op ( size_t  i_z,
size_t  i_x,
bool *  rev_jacobian,
Vector_set &  for_jac_sparsity,
Vector_set &  rev_hes_sparsity 
)
inline

Prototype for reverse mode Hessian sparsity unary operators.

This routine is given the forward mode Jacobian sparsity patterns for x. It is also given the reverse mode dependence of G on z. In addition, it is given the revese mode Hessian sparsity for the quanity of interest G(z , y , ... ) and it uses them to compute the sparsity patterns for

     H( x , w , u , ... ) = G[ z(x) , x , w , u , ... ]
Template Parameters
Vector_setis the type used for vectors of sets. It can be either sparse_pack or sparse_list.
Parameters
i_zvariable index corresponding to the result for this operation; i.e. the row index in sparsity corresponding to z.
i_xvariable index corresponding to the argument for this operator; i.e. the row index in sparsity corresponding to x.
rev_jacobianrev_jacobian[i_z] is all false (true) if the Jacobian of G with respect to z must be zero (may be non-zero).

rev_jacobian[i_x] is all false (true) if the Jacobian with respect to x must be zero (may be non-zero). On input, it corresponds to the function G, and on output it corresponds to the function H.
for_jac_sparsityThe set with index i_x in for_jac_sparsity is the forward mode Jacobian sparsity pattern for the variable x.
rev_hes_sparsityThe set with index i_z in in rev_hes_sparsity is the Hessian sparsity pattern for the fucntion G where one of the partials derivative is with respect to z.

The set with index i_x in rev_hes_sparsity is the Hessian sparsity pattern where one of the partials derivative is with respect to x. On input, it corresponds to the function G, and on output it corresponds to the function H.
Checked Assertions:
  • i_x < i_z

Definition at line 1356 of file prototype_op.hpp.