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 >::SparseJacobianFor ( const VectorBase &  x,
VectorSet &  p_transpose,
const VectorSize &  row,
const VectorSize &  col,
VectorBase &  jac,
sparse_jacobian_work work 

Private helper function forward 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.
x[in] is a vector specifing the point at which to compute the Jacobian.
p_transpose[in] If work.color.size() != 0, then p_transpose is not used. Otherwise, it is a sparsity pattern for the transpose of the Jacobian of this ADFun<Base> object. Note that we do not change the values in p_transpose, 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. We use K to denote the size of jac. 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 SparseJacobainFor. If the sparsity pattern, row vector, or col vectors are not the same between calls to SparseJacobianFor, work.clear() must be called to reinitialize work.
Is the number of first order forward sweeps used to compute the requested 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 365 of file sparse_jacobian.hpp.