Prev | Next | atomic_two_for_sparse_hes |
ok = afun.for_sparse_hes(vx, r, s, h, x)
ok = afun.for_sparse_hes(vx, r, s, h)
Given a sparsity pattern
for
a diagonal matrix @(@
R \in \B{R}^{n \times n}
@)@, and
a row vector @(@
S \in \B{R}^{1 \times m}
@)@,
this routine computes the sparsity pattern for
@[@
H(x) = R^\R{T} \cdot (S \cdot f)^{(2)}( x ) \cdot R
@]@
vx
has prototype
const CppAD:vector<bool>& vx
vx.size() == n
, and
for @(@
j = 0 , \ldots , n-1
@)@,
vx[j]
is true if and only if
ax[j]
is a variable
or dynamic parameter
in the corresponding call to
afun(ax, ay)
const CppAD:vector<bool>& r
and is a atomic_sparsity
pattern for
the diagonal of @(@
R \in \B{R}^{n \times n}
@)@.
s
has prototype
const CppAD:vector<bool>& s
and its size is
m
.
It is a sparsity pattern for @(@
S \in \B{R}^{1 \times m}
@)@.
atomic_sparsity& h
The input value of its elements
are not specified (must not matter).
Upon return,
h
is a
atomic_sparsity
pattern for
@(@
H(x) \in \B{R}^{n \times n}
@)@ which is defined above.
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.