CppAD: A C++ Algorithmic Differentiation Package  20171217
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
template<class SizeVector , class InternalSparsity >
void CppAD::local::set_internal_sparsity ( bool  zero_empty,
bool  input_empty,
bool  transpose,
const vector< size_t > &  internal_index,
InternalSparsity &  internal_pattern,
const sparse_rc< SizeVector > &  pattern_in 

Update the internal sparsity pattern for a sub-set of rows.

Template Parameters
SizeVectorThe type used for index sparsity patterns. This is a simple vector with elements of type size_t.
InternalSparsitiyThe type used for intenal sparsity patterns. This can be either sparse_pack or sparse_list.
zero_emptyIf this is true, the internal sparstity pattern corresponds to row zero must be empty on input and will be emtpy output; i.e., any corresponding values in pattern_in will be ignored.
input_emptyIf this is true, the initial sparsity pattern for row internal_index[i] is empty for all i. In this case, one is setting the sparsity patterns; i.e., the output pattern in row internal_index[i] is the corresponding entries in pattern.
transposeIf this is true, pattern_in is transposed.
internal_indexThis specifies the sub-set of rows in internal_sparsity that we are updating. If traspose is false (true), this is the mapping from row (column) index in pattern_in to the corresponding row index in the internal_pattern.
internal_patternOn input, the number of sets internal_pattern.n_set(), and possible elements internal_pattern.end(), have been set. If input_empty is true, and all of the sets in internal_index are empty on input. On output, the entries in pattern_in are added to internal_pattern. To be specific, suppose transpose is false, and (i, j) is a possibly non-zero entry in pattern_in, the entry (internal_index[i], j) is added to internal_pattern. On the other hand, if transpose is true, the entry (internal_index[j], i) is added to internal_pattern.
pattern_inThis is the sparsity pattern for variables, or its transpose, depending on the value of transpose.

Definition at line 102 of file sparse_internal.hpp.

Referenced by CppAD::ADFun< Base >::for_jac_sparsity(), CppAD::atomic_base< double >::for_sparse_jac(), CppAD::ADFun< Base >::rev_jac_sparsity(), CppAD::atomic_base< double >::rev_sparse_hes(), CppAD::atomic_base< double >::rev_sparse_jac(), CppAD::ADFun< Base >::sparse_hes(), CppAD::ADFun< Base >::sparse_jac_for(), and CppAD::ADFun< Base >::sparse_jac_rev().