Prev | Next | atomic_two_rev_sparse_jac |
ok = afun.rev_sparse_jac(q, rt, st, x)
ok = afun.rev_sparse_jac(q, rt, st)
For a fixed matrix @(@
R \in \B{R}^{q \times m}
@)@,
the Jacobian of @(@
R * f( x )
@)@ with respect to @(@
x \in \B{R}^n
@)@ is
@[@
S(x) = R * f^{(1)} (x)
@]@
Given a sparsity pattern
for @(@
R
@)@,
rev_sparse_jac
computes a sparsity pattern for @(@
S(x)
@)@.
q
has prototype
size_t q
It specifies the number of rows in
@(@
R \in \B{R}^{q \times m}
@)@ and the Jacobian
@(@
S(x) \in \B{R}^{q \times n}
@)@.
const atomic_sparsity& rt
and is a
atomic_sparsity
pattern for
@(@
R^\R{T} \in \B{R}^{m \times q}
@)@.
atomic_sparsity& st
The input value of its elements
are not specified (must not matter).
Upon return,
s
is a
atomic_sparsity
pattern for
@(@
S(x)^\R{T} \in \B{R}^{n \times q}
@)@.
const CppAD::vector<Base>& x
and size is equal to the
n
.
This is the 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
has prototype
bool ok
If it is true
, the corresponding evaluation succeeded,
otherwise it failed.