|
Prev | Next | ForwardOne |
dy = f.Forward(1, dx)
dy = f.Forward(1, dx, s)
F : B^n \rightarrow B^m
to denote the
AD function
corresponding to
f
.
The result of the syntax above is
\[
dy = F^{(1)} (x) * dx
\]
where
F^{(1)} (x)
is the Jacobian of
F
evaluated at
x
.
f
has prototype
ADFun<Base> f
Note that the ADFun
object
f
is not const.
Before this call to Forward, the value returned by
f.size_taylor()
must be greater than or equal one.
After this call it will be will be two (see size_taylor
).
x
in expression for
dy
above
corresponds to the previous call to ForwardZero
using this ADFun object
f
; i.e.,
f.Forward(0, x)
If there is no previous call with the first argument zero,
the value of the independent
variables
during the recording of the AD sequence of operations is used
for
x
.
dx
has prototype
const Vector& x
(see Vector
below)
and its size
must be equal to
n
, the dimension of the
domain
space for
f
.
s
, if present, is not used during this operation.
dy
has prototype
Vector dy
(see Vector
below)
and its value is
F^{(1)} (x) * dx
.
The size of
dy
is equal to
m
, the dimension of the
range
space for
f
.
Vector
must be a SimpleVector
class with
elements of type
Base
.
The routine CheckSimpleVector
will generate an error message
if this is not the case.