1 # ifndef CPPAD_CORE_REV_JAC_SPARSITY_HPP
2 # define CPPAD_CORE_REV_JAC_SPARSITY_HPP
163 template <
class Base>
164 template <
class SizeVector>
172 size_t nr_in = pattern_in.
nr();
173 size_t nc_in = pattern_in.
nc();
182 "rev_jac_sparsity: number columns in R "
183 "is not equal number of dependent variables."
188 bool zero_empty =
true;
189 bool input_empty =
true;
194 internal_jac.
resize(num_var_tape_, ell);
216 ! transpose, ind_taddr_, internal_jac, pattern_out
223 internal_jac.
resize(num_var_tape_, ell);
245 ! transpose, ind_taddr_, internal_jac, pattern_out
#define CPPAD_ASSERT_KNOWN(exp, msg)
Check that exp is true, if not print msg and terminate execution.
Vector of sets of positive integers, each set stored as a singly linked list.
void get_internal_sparsity(bool transpose, const vector< size_t > &internal_index, const InternalSparsity &internal_pattern, sparse_rc< SizeVector > &pattern_out)
Get sparsity pattern for a sub-set of variables.
size_t nr(void) const
number of rows in matrix
Vector of sets of postivie integers, each set stored as a packed boolean array.
sparsity pattern for a matrix with indices of type size_t
void resize(size_t n_set, size_t end)
Start a new vector of sets.
size_t nc(void) const
number of columns in matrix
File used to define the ADFun<Base> class.
void 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.
Routines that enable code to be independent of which internal spasity pattern is used.
void rev_jac_sparsity(const sparse_rc< SizeVector > &pattern_in, bool transpose, bool dependency, bool internal_bool, sparse_rc< SizeVector > &pattern_out)
Reverse Jacobian sparsity patterns.
void rev_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 dependent variables, RevJacSweep computes the sparsity pattern for...
void resize(size_t n_set, size_t end)
Change number of sets, set end, and initialize all sets as empty.