1 # ifndef CPPAD_CORE_FOR_JAC_SPARSITY_HPP
2 # define CPPAD_CORE_FOR_JAC_SPARSITY_HPP
206 template <
class Base>
207 template <
class SizeVector>
215 size_t nr_in = pattern_in.
nr();
216 size_t nc_in = pattern_in.
nc();
225 "for_jac_sparsity: number rows in R "
226 "is not equal number of independent variables."
228 bool zero_empty =
true;
229 bool input_empty =
true;
233 for_jac_sparse_pack_.resize(num_var_tape_, ell);
234 for_jac_sparse_set_.resize(0, 0);
242 for_jac_sparse_pack_ ,
256 transpose, dep_taddr_, for_jac_sparse_pack_, pattern_out
263 for_jac_sparse_set_.resize(num_var_tape_, ell);
264 for_jac_sparse_pack_.resize(0, 0);
272 for_jac_sparse_set_ ,
286 transpose, dep_taddr_, for_jac_sparse_set_, pattern_out
#define CPPAD_ASSERT_KNOWN(exp, msg)
Check that exp is true, if not print msg and terminate execution.
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.
void for_jac_sparsity(const sparse_rc< SizeVector > &pattern_in, bool transpose, bool dependency, bool internal_bool, sparse_rc< SizeVector > &pattern_out)
Forward Jacobian sparsity patterns.
size_t nr(void) const
number of rows in matrix
sparsity pattern for a matrix with indices of type size_t
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 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 f...