CppAD: A C++ Algorithmic Differentiation Package 20110419
template<class Vector_set >
void reverse_sparse_hessian_linear_unary_op ( size_t  i_z,
size_t  i_x,
bool *  rev_jacobian,
Vector_set &  for_jac_sparsity,
Vector_set &  rev_hes_sparsity 
) [inline]

Reverse mode Hessian sparsity pattern for linear unary operators.

The C++ source code corresponding to this operation is

        z = fun(x)

where fun is a linear functions; e.g. abs, or

	z = x op p

where op is a C++ binary operator and p is a parameter.

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_set.
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 157 of file sparse_unary_op.hpp.

Referenced by RevHesSweep().