CppAD: A C++ Algorithmic Differentiation Package  20171217
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
template<class Base >
template<class VectorBase , class VectorSet , class VectorSize >
size_t CppAD::ADFun< Base >::SparseJacobianRev ( const VectorBase &  x,
VectorSet &  p,
const VectorSize &  row,
const VectorSize &  col,
VectorBase &  jac,
sparse_jacobian_work work 
)
private

Private helper function for reverse mode cases.

Template Parameters
Baseis the base type for the recording that is stored in this ADFun<Base> object.
VectorBaseis a simple vector class with elements of type Base.
VectorSetis either sparse_pack or sparse_list.
VectorSizeis a simple vector class with elements of type size_t.
Parameters
x[in] is a vector specifing the point at which to compute the Jacobian.
p[in] If work.color.size() != 0, then p is not used. Otherwise, it is a sparsity pattern for the Jacobian of this ADFun<Base> object. Note that we do not change the values in p, but is not const because we use its iterator facility.
row[in] is the vector of row indices for the returned Jacobian values.
col[in] is the vector of columns indices for the returned Jacobian values. It must have the same size as row.
jac[out] is the vector of Jacobian values. It must have the same size as row. The return value jac[k] is the partial of the row[k] range component of the function with respect the the col[k] domain component of its argument.
workwork.color_method is an input. The rest of This structure contains information that is computed by SparseJacobainRev. If the sparsity pattern, row vector, or col vectors are not the same between calls to SparseJacobianRev, work.clear() must be called to reinitialize work.
Returns
Is the number of first order reverse sweeps used to compute the reverse Jacobian values. The total work, not counting the zero order forward sweep, or the time to combine computations, is proportional to this return value.

Definition at line 562 of file sparse_jacobian.hpp.