CppAD: A C++ Algorithmic Differentiation Package 20110419
template<class Base , class VectorSet , class Sparsity >
void ForSparseJacSet ( size_t  q,
const VectorSet &  r,
VectorSet &  s,
size_t  total_num_var,
CppAD::vector< size_t > &  dep_taddr,
CppAD::vector< size_t > &  ind_taddr,
CppAD::player< Base > &  play,
Sparsity &  for_jac_sparsity 
)

Calculate Jacobian sparsity patterns using forward mode.

The C++ source code corresponding to this operation is

	s = f.ForSparseJac(q, r)
Template Parameters:
Baseis the base type for this recording.
VectorSetis a simple vector class with elements of the type std::set<size_t>.
Sparsityis either sparse_pack or sparse_set.
Parameters:
qis the number of columns in the matrix $ R $.
ris a sparsity pattern for the matrix $ R $.
sThe input value of s must be a vector with size m where m is the number of dependent variables corresponding to the operation sequence stored in play. On input, each element of s must be an empty set. On output, s is the sparsity pattern for the matrix

\[ S(x) = F^{(1)} (x) * R \]

where $ F $ is the function corresponding to the operation sequence and x is any argument value.
total_num_varis the total number of variable in this recording.
dep_taddrmaps dependendent variable index to the corresponding variable in the tape.
ind_taddrmaps independent variable index to the corresponding variable in the tape.
playis the recording that defines the function we are computing the sparsity pattern for.
for_jac_sparsitythe input value of for_jac_sparsity does not matter. On output, for_jac_sparsity.n_set() == total_num_var and for_jac_sparsity.end() == q. It contains the forward sparsity pattern for all of the variables on the tape (given the sparsity pattern for the independent variables is $ R $).

Definition at line 370 of file for_sparse_jac.hpp.

Referenced by ADFun< Base >::ForSparseJacCase().