\(\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}} }\)
atomic_two_rev_sparse_hes¶
View page sourceAtomic Reverse Hessian Sparsity Patterns¶
Syntax¶
rev_sparse_hes
( vx , s , t , q , r , u , v , x )Deprecated 2016-06-27¶
ok = afun . rev_sparse_hes
( vx , s , t , q , r , u , v )
Purpose¶
This function is used by RevSparseHes to compute Hessian sparsity patterns. If you are using RevSparseHes to compute one of the versions of this virtual function muse be defined by the atomic_user class.
There is an unspecified scalar valued function \(g : \B{R}^m \rightarrow \B{R}\). Given a Sparsity Pattern for \(R \in \B{R}^{n \times q}\), and information about the function \(z = g(y)\), this routine computes the sparsity pattern for
Implementation¶
If you are using and RevSparseHes , this virtual function must be defined by the atomic_user class.
vx¶
The argument 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 )
s¶
The argument s has prototype
const CppAD:vector<bool>&
s
and its size is m . It is a sparsity pattern for \(S(x) = g^{(1)} [ f(x) ] \in \B{R}^{1 \times m}\).
t¶
This argument has prototype
CppAD:vector<bool>&
t
and its size is m . The input values of its elements are not specified (must not matter). Upon return, t is a sparsity pattern for \(T(x) \in \B{R}^{1 \times n}\) where
q¶
The argument q has prototype
size_t
q
It specifies the number of columns in \(R \in \B{R}^{n \times q}\), \(U(x) \in \B{R}^{m \times q}\), and \(V(x) \in \B{R}^{n \times q}\).
r¶
This argument has prototype
const
atomic_sparsity & r
and is a atomic_sparsity pattern for \(R \in \B{R}^{n \times q}\).
u¶
This argument has prototype
const
atomic_sparsity & u
and is a atomic_sparsity pattern for \(U(x) \in \B{R}^{m \times q}\) which is defined by
v¶
This argument has prototype
atomic_sparsity & v
The input value of its elements are not specified (must not matter). Upon return, v is a atomic_sparsity pattern for \(V(x) \in \B{R}^{n \times q}\) which is defined by
x¶
The argument has prototype
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
)Value
( ax [ i ] );else
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.