CppAD: A C++ Algorithmic Differentiation Package  20130102
template<class Vector_set >
void forward_sparse_jacobian_unary_op ( size_t  i_z,
size_t  i_x,
Vector_set &  sparsity 
) [inline]

Forward mode Jacobian sparsity pattern for all unary operators.

The C++ source code corresponding to a unary operation has the form

	z = fun(x)

where fun is a C++ unary function, or it has the form

	z = x op p

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

Template Parameters:
Vector_setis the type used for vectors of sets. It can be either sparse_pack, sparse_set or sparse_list.
Parameters:
i_zvariable index corresponding to the result for this operation; i.e., z.
i_xvariable index corresponding to the argument for this operator; i.e., x.
sparsityInput: The set with index arg[0] in sparsity is the sparsity bit pattern for x. This identifies which of the independent variables the variable x depends on.

Output: The set with index i_z in sparsity is the sparsity bit pattern for z. This identifies which of the independent variables the variable z depends on.
Checked Assertions:
  • i_x < i_z

Definition at line 68 of file sparse_unary_op.hpp.

Referenced by ForJacSweep().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines