CppAD: A C++ Algorithmic Differentiation Package
20171217
|
|
inline |
Reverse 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 q
where op is a C++ bianry operator and q is a parameter.
This routine is given the sparsity patterns for a function G(z, y, ... ) and it uses them to compute the sparsity patterns for
H( x , w , u , ... ) = G[ z(x) , x , w , u , ... ]
Vector_set | is the type used for vectors of sets. It can be either sparse_pack or sparse_list. |
i_z | variable index corresponding to the result for this operation; i.e. the row index in sparsity corresponding to z. |
i_x | variable index corresponding to the argument for this operator; i.e. the row index in sparsity corresponding to x. |
sparsity | Input: The set with index i_z in sparsity is the sparsity bit pattern for G with respect to the variable z. Input: The set with index i_x in sparsity is the sparsity bit pattern for G with respect to the variable x. Output: The set with index i_x in sparsity is the sparsity bit pattern for H with respect to the variable x. |
Definition at line 127 of file sparse_unary_op.hpp.
Referenced by rev_jac_sweep().