![]() |
Prev | Next |
ddy =
f.ForTwo(
x,
j,
k)
F : B^n \rightarrow B^m
to denote the
AD function
corresponding to f.
The syntax above sets
\[
ddy [ i * p + \ell ]
=
\DD{ F_i }{ x_{j[ \ell ]} }{ x_{k[ \ell ]} } (x)
\]
for
i = 0 , \ldots , m-1
and
\ell = 0 , \ldots , p
,
where
p
is the size of the vectors j and k.
ADFun<
Base>
f
Note that the ADFun
object f is not const
(see ForTwo Uses Forward
below).
const
VectorBase &
x
(see VectorBase
below)
and its size
must be equal to n, the dimension of the
domain
space for f.
It specifies
that point at which to evaluate the partial derivatives listed above.
const
VectorSize_t &
j
(see VectorSize_t
below)
We use p to denote the size of the vector j.
All of the indices in j
must be less than n; i.e.,
for
\ell = 0 , \ldots , p-1
,
j[ \ell ] < n
.
const
VectorSize_t &
k
(see VectorSize_t
below)
and its size must be equal to p,
the size of the vector j.
All of the indices in k
must be less than n; i.e.,
for
\ell = 0 , \ldots , p-1
,
k[ \ell ] < n
.
VectorBase
ddy
(see VectorBase
below)
and its size is
m * p
.
It contains the requested partial derivatives; to be specific,
for
i = 0 , \ldots , m - 1
and
\ell = 0 , \ldots , p - 1
\[
ddy [ i * p + \ell ]
=
\DD{ F_i }{ x_{j[ \ell ]} }{ x_{k[ \ell ]} } (x)
\]
ForTwo
,
the previous calls to Forward
are undefined.
true
, if it succeeds and false
otherwise.