CppAD: A C++ Algorithmic Differentiation Package
20130102
|
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)
Base | is the base type for this recording. |
VectorSet | is a simple vector class with elements of type bool . |
q | is the number of columns in the matrix ![]() |
r | is a sparsity pattern for the matrix ![]() |
s | The 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
![]() |
total_num_var | is the total number of variable in this recording. |
dep_taddr | maps dependendent variable index to the corresponding variable in the tape. |
ind_taddr | maps independent variable index to the corresponding variable in the tape. |
play | is the recording that defines the function we are computing the sparsity pattern for. |
for_jac_sparsity | the 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 ![]() |
Definition at line 242 of file for_sparse_jac.hpp.
Referenced by ADFun< Base >::ForSparseJacCase().