Prev Next Index-> contents reference index search external Up-> CppAD AD ADValued atomic atomic_base atomic_option ADValued-> Arithmetic unary_standard_math binary_math CondExp Discrete numeric_limits atomic atomic-> checkpoint atomic_base atomic_base-> atomic_ctor atomic_option atomic_afun atomic_forward atomic_reverse atomic_for_sparse_jac atomic_rev_sparse_jac atomic_for_sparse_hes atomic_rev_sparse_hes atomic_base_clear atomic_get_started.cpp atomic_norm_sq.cpp atomic_reciprocal.cpp atomic_set_sparsity.cpp atomic_tangent.cpp atomic_eigen_mat_mul.cpp atomic_eigen_mat_inv.cpp atomic_eigen_cholesky.cpp atomic_mat_mul.cpp atomic_option Headings-> Syntax atomic_sparsity ---..pack_sparsity_enum ---..bool_sparsity_enum ---..set_sparsity_enum

$\newcommand{\W}[1]{ \; #1 \; } \newcommand{\R}[1]{ {\rm #1} } \newcommand{\B}[1]{ {\bf #1} } \newcommand{\D}[2]{ \frac{\partial #1}{\partial #2} } \newcommand{\DD}[3]{ \frac{\partial^2 #1}{\partial #2 \partial #3} } \newcommand{\Dpow}[2]{ \frac{\partial^{#1}}{\partial {#2}^{#1}} } \newcommand{\dpow}[2]{ \frac{ {\rm d}^{#1}}{{\rm d}\, {#2}^{#1}} }$
Set Atomic Function Options

Syntax
afun.option(option_value) These settings do not apply to individual afun calls, but rather all subsequent uses of the corresponding atomic operation in an ADFun object.

atomic_sparsity
Note that, if you use optimize , these sparsity patterns are used to determine the dependency relationship between argument and result variables.

pack_sparsity_enum
If option_value is atomic_base<Base>::pack_sparsity_enum , then the type used by afun for sparsity patterns , (after the option is set) will be       typedef CppAD::vectorBool atomic_sparsity  If r is a sparsity pattern for a matrix $R \in B^{p \times q}$: r.size() == p * q .

bool_sparsity_enum
If option_value is atomic_base<Base>::bool_sparsity_enum , then the type used by afun for sparsity patterns , (after the option is set) will be       typedef CppAD::vector<bool> atomic_sparsity  If r is a sparsity pattern for a matrix $R \in B^{p \times q}$: r.size() == p * q .

set_sparsity_enum
If option_value is atomic_base<Base>::set_sparsity_enum , then the type used by afun for sparsity patterns , (after the option is set) will be       typedef CppAD::vector< std::set<size_t> > atomic_sparsity  If r is a sparsity pattern for a matrix $R \in B^{p \times q}$: r.size() == p , and for $i = 0 , \ldots , p-1$, the elements of r[i] are between zero and $q-1$ inclusive.