CppAD: A C++ Algorithmic Differentiation Package
20171217
|
|
inline |
Reverse mode Jacobian sparsity pattern for all binary operators.
The C++ source code corresponding to a unary operation has the form
z = fun(x, y)
where fun is a C++ unary function and x and y are variables, or it has the form
z = x op y
where op is a C++ bianry operator and x and y are variables.
This routine is given the sparsity patterns for a function G(z, y, x, ... ) and it uses them to compute the sparsity patterns for
H( y, x, w , u , ... ) = G[ z(x,y) , y , 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., z. |
arg | arg[0] variable index corresponding to the left operand for this operator; i.e., x. |
arg[1] variable index corresponding to the right operand for this operator; i.e., y.
sparsity | The set with index i_z in sparsity is the sparsity pattern for z corresponding ot the function G. The set with index arg[0] in sparsity is the sparsity pattern for x. On input, it corresponds to the function G, and on output it corresponds to H. The set with index arg[1] in sparsity is the sparsity pattern for y. On input, it corresponds to the function G, and on output it corresponds to H. |
Definition at line 156 of file sparse_binary_op.hpp.
Referenced by rev_jac_sweep().