CppAD: A C++ Algorithmic Differentiation Package  20130102
template<class Base , class VectorSet >
void ForSparseJacBool ( 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,
sparse_pack for_jac_sparsity 
)

Calculate Jacobian vector of bools 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 type bool.
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*q where m is the number of dependent variables corresponding to the operation sequence stored in play. The input value of the components of s does not matter. 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 242 of file for_sparse_jac.hpp.

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

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines