CppAD: A C++ Algorithmic Differentiation Package  20171217
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
template<class Base >
template<class SizeVector , class BaseVector >
size_t CppAD::ADFun< Base >::sparse_jac_for ( size_t  group_max,
const BaseVector &  x,
sparse_rcv< SizeVector, BaseVector > &  subset,
const sparse_rc< SizeVector > &  pattern,
const std::string &  coloring,
sparse_jac_work work 
)

Calculate sparse Jacobains using forward mode.

Template Parameters
Basethe base type for the recording that is stored in the ADFun object.
SizeVectora simple vector class with elements of type size_t.
BaseVectora simple vector class with elements of type Base.
Parameters
group_maxspecifies the maximum number of colors to group during a single forward sweep. This must be greater than zero and group_max = 1 minimizes memory usage.
xa vector of length n, the number of independent variables in f (this ADFun object).
subsetspecifices the subset of the sparsity pattern where the Jacobian is evaluated. subset.nr() == m, subset.nc() == n.
patternis a sparsity pattern for the Jacobian of f; pattern.nr() == m, pattern.nc() == n, where m is number of dependent variables in f.
coloringdetermines which coloring algorithm is used. This must be cppad or colpack.
workthis structure must be empty, or contain the information stored by a previous call to sparse_jac_for. The previous call must be for the same ADFun object f and the same subset.
Returns
This is the number of first order forward sweeps used to compute the Jacobian.

Definition at line 286 of file sparse_jac.hpp.