Prev Next ForwardOne

First Order Forward Mode: Derivative Values

Syntax
dy = f.Forward(1, dx)

Purpose
We use  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
The object f has prototype
     ADFun<
Basef
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
The vector 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
The argument 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.

dy
The result 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
The type 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.

Example
The file Forward.cpp contains an example and test of this operation. It returns true if it succeeds and false otherwise.
Input File: omh/forward.omh