CppAD: A C++ Algorithmic Differentiation Package 20110419
template<class Base , class Vector_set >
void ForJacSweep ( size_t  n,
size_t  numvar,
player< Base > *  play,
Vector_set &  var_sparsity 
)

Given the sparsity pattern for the independent variables, ForJacSweep computes the sparsity pattern for all the other variables.

Template Parameters:
Basebase type for the operator; i.e., this operation sequence was recorded using AD< Base > and computations by this routine are done using type Base.
Vector_setis the type used for vectors of sets. It can be either sparse_pack or sparse_set.
Parameters:
nis the number of independent variables on the tape.
numvaris the total number of variables on the tape; i.e., play->num_rec_var().
playThe information stored in play is a recording of the operations corresponding to a function

\[ F : {\bf R}^n \rightarrow {\bf R}^m \]

where $ n $ is the number of independent variables and $ m $ is the number of dependent variables. The object play is effectly constant. It is not declared const because while playing back the tape the object play holds information about the currentl location with in the tape and this changes during playback.
var_sparsityInput: 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.
Checked Assertions:
  • numvar == var_sparsity.n_set()
  • numvar == play->num_rec_var()

Definition at line 79 of file for_jac_sweep.hpp.

Referenced by ForSparseJacBool(), and ForSparseJacSet().