CppAD: A C++ Algorithmic Differentiation Package  20171217
template<class Base >
template<class VectorBase , class VectorSet , class VectorSize >
 size_t CppAD::ADFun< Base >::SparseJacobianForward ( const VectorBase & x, const VectorSet & p, const VectorSize & row, const VectorSize & col, VectorBase & jac, sparse_jacobian_work & work )

Compute user specified subset of a sparse Jacobian using forward mode.

The C++ source code corresponding to this operation is

```     SparceJacobianForward(x, p, row, col, jac, work)
```
Template Parameters
 Base is the base type for the recording that is stored in this `ADFun` object. VectorBase is a simple vector class with elements of type Base. VectorSet is a simple vector class with elements of type `bool` or `std::set`. VectorSize is 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] is the sparsity pattern for the Jacobian that we are calculating. 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. work [in,out] this structure contains information that depends on the function object, sparsity pattern, `row` vector, and `col` vector. If they are not the same between calls to `SparseJacobianForward`, `work.clear()` must be called to reinitialize them.
Returns
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 728 of file sparse_jacobian.hpp.