CppAD: A C++ Algorithmic Differentiation Package
20171217
|
void CppAD::local::for_jac_sweep | ( | const local::player< Base > * | play, |
bool | dependency, | ||
size_t | n, | ||
size_t | numvar, | ||
Vector_set & | var_sparsity | ||
) |
Given the sparsity pattern for the independent variables, ForJacSweep computes the sparsity pattern for all the other variables.
Base | this operation sequence was recorded using AD<Base>. |
Vector_set | is the type used for vectors of sets. It can be either sparse_pack or sparse_list. |
dependency | Are the derivatives with respect to left and right of the expression below considered to be non-zero: CondExpRel(left, right, if_true, if_false)
|
n | is the number of independent variables on the tape. |
numvar | is the total number of variables on the tape; i.e., play->num_var_rec(). |
play | The information stored in play is a recording of the operations corresponding to a function
![]() ![]() |
var_sparsity | Input: For j = 1 , ... , n, the sparsity pattern for the independent variable with index (j-1) corresponds to the set with index j in var_sparsity. Output: For i = n + 1 , ... , numvar - 1, the sparsity pattern for the variable with index i on the tape corresponds to the set with index i in var_sparsity. |
Definition at line 82 of file for_jac_sweep.hpp.
Referenced by CppAD::ADFun< Base >::for_hes_sparsity(), CppAD::ADFun< Base >::for_jac_sparsity(), CppAD::ADFun< Base >::ForSparseHesCase(), CppAD::ADFun< Base >::ForSparseJacCase(), and CppAD::ADFun< Base >::ForSparseJacCheckpoint().