lines 8-112 of file: include/cppad/core/atomic/two/for_sparse_hes.hpp

{xrst_begin atomic_two_for_sparse_hes app}
{xrst_spell
   vx
}

Atomic Forward Hessian Sparsity Patterns
########################################

Syntax
******
*ok* = *afun* . ``for_sparse_hes`` ( *vx* , *r* , *s* , *h* , *x* )

Deprecated 2016-06-27
*********************
*ok* = *afun* . ``for_sparse_hes`` ( *vx* , *r* , *s* , *h* )

Purpose
*******
This function is used by :ref:`ForSparseHes-name` to compute
Hessian sparsity patterns.
If you are using :ref:`ForSparseHes-name` ,
one of the versions of this
virtual function must be defined by the
:ref:`atomic_two_ctor@atomic_user` class.

Given a :ref:`glossary@Sparsity Pattern` for
a diagonal matrix :math:`R \in \B{R}^{n \times n}`, and
a row vector :math:`S \in \B{R}^{1 \times m}`,
this routine computes the sparsity pattern for

.. math::

   H(x) = R^\R{T} \cdot (S \cdot f)^{(2)}( x ) \cdot R

Implementation
**************
If you are using and :ref:`ForSparseHes-name` ,
this virtual function must be defined by the
:ref:`atomic_two_ctor@atomic_user` class.

vx
==
The argument *vx* has prototype

   ``const CppAD:vector<bool>&`` *vx*

*vx* . ``size`` () == *n* , and
for :math:`j = 0 , \ldots , n-1`,
*vx* [ *j* ] is true if and only if
*ax* [ *j* ] is a :ref:`glossary@Variable`
or :ref:`dynamic parameter<glossary@Parameter@Dynamic>`
in the corresponding call to

   *afun* ( *ax* , *ay* )

r
=
This argument has prototype

   ``const CppAD:vector<bool>&`` *r*

and is a :ref:`atomic_two_option@atomic_sparsity` pattern for
the diagonal of :math:`R \in \B{R}^{n \times n}`.

s
=
The argument *s* has prototype

   ``const CppAD:vector<bool>&`` *s*

and its size is *m* .
It is a sparsity pattern for :math:`S \in \B{R}^{1 \times m}`.

h
=
This argument has prototype

   *atomic_sparsity* & *h*

The input value of its elements
are not specified (must not matter).
Upon return, *h* is a
:ref:`atomic_two_option@atomic_sparsity` pattern for
:math:`H(x) \in \B{R}^{n \times n}` which is defined above.

x
=
The argument has prototype

   ``const CppAD::vector<`` *Base* >& *x*

and size is equal to the *n* .
This is the :ref:`Value-name` value corresponding to the parameters in the
vector :ref:`atomic_two_afun@ax` (when the atomic function was called).
To be specific, if

| |tab| ``if`` ( ``Parameter`` ( *ax* [ *i* ]) == ``true`` )
| |tab| |tab| *x* [ *i* ] = ``Value`` ( *ax* [ *i* ] );
| |tab| ``else``
| |tab| |tab| *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.

{xrst_end atomic_two_for_sparse_hes}
