Prev Next atomic_two_for_sparse_jac

@(@\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}} }@)@ This is cppad-20221105 documentation. Here is a link to its current documentation .
Atomic Forward Jacobian Sparsity Patterns

Syntax
ok = afun.for_sparse_jac(qrsx)

Deprecated 2016-06-27
ok = afun.for_sparse_jac(qrs)

Purpose
This function is used by ForSparseJac to compute Jacobian sparsity patterns. For a fixed matrix @(@ R \in \B{R}^{n \times q} @)@, the Jacobian of @(@ f( x + R * u) @)@ with respect to @(@ u \in \B{R}^q @)@ is @[@ S(x) = f^{(1)} (x) * R @]@ Given a sparsity pattern for @(@ R @)@, for_sparse_jac computes a sparsity pattern for @(@ S(x) @)@.

Implementation
If you are using ForSparseJac , ForSparseHes , or RevSparseHes , one of the versions of this virtual function must be defined by the atomic_user class.

q
The argument q has prototype
    size_t 
q
It specifies the number of columns in @(@ R \in \B{R}^{n \times q} @)@ and the Jacobian @(@ S(x) \in \B{R}^{m \times q} @)@.

r
This argument has prototype
     const 
atomic_sparsityr
and is a atomic_sparsity pattern for @(@ R \in \B{R}^{n \times q} @)@.

s
This argument has prototype
    
atomic_sparsitys
The input values of its elements are not specified (must not matter). Upon return, s is a atomic_sparsity pattern for @(@ S(x) \in \B{R}^{m \times q} @)@.

x
The argument has prototype
    const CppAD::vector<
Base>& x
and size is equal to the n . This is the Value value corresponding to the parameters in the vector ax (when the atomic function was called). To be specific, if
    if( Parameter(
ax[i]) == true )
        
x[i] = Value( ax[i] );
    else
        
x[i] = CppAD::numeric_limits<Base>::quiet_NaN();
The version of this function with out the x argument is deprecated; i.e., you should include the argument even if you do not use it.

ok
The return value ok has prototype
    bool 
ok
If it is true, the corresponding evaluation succeeded, otherwise it failed.
Input File: include/cppad/core/atomic/two/for_sparse_jac.hpp