Prev Next forward_zero

@(@\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}} }@)@This is cppad-20221105 documentation. Here is a link to its current documentation .
Zero Order Forward Mode: Function Values

Syntax
y0 = f.Forward(0, x0)
y0 = f.Forward(0, x0s)

Purpose
We use @(@ F : \B{R}^n \rightarrow \B{R}^m @)@ to denote the AD function corresponding to f . The result of the syntax above is @[@ y0 = F(x0) @]@ See the FunCheck discussion for possible differences between @(@ F(x) @)@ and the algorithm that defined the operation sequence.

f
The object f has prototype
    ADFun<
Basef
Note that the ADFun object f is not const. After this call to Forward, the value returned by
    
f.size_order()
will be equal to one (see size_order ).

x0
The argument x0 has prototype
    const 
Vectorx0
(see Vector below) and its size must be equal to n , the dimension of the domain space for f .

s
If the argument s is not present, std::cout is used in its place. Otherwise, this argument has prototype
    std::ostream& 
s
It specifies where the output corresponding to PrintFor , and this zero order forward mode call, will be written.

y0
The result y0 has prototype
    
Vector y0
(see Vector below) and its value is @(@ F(x) @)@ at x = x0 . The size of y0 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.

Special Case
This is special case of forward_order where @[@ \begin{array}{rcl} Y(t) & = & F[ X(t) ] \\ X(t) & = & x^{(0)} t^0 + x^{(1)} * t^1 + \cdots, + x^{(q)} * t^q + o( t^q ) \\ Y(t) & = & y^{(0)} t^0 + y^{(1)} * t^1 + \cdots, + y^{(q)} * t^q + o( t^q ) \end{array} @]@ and @(@ o( t^q ) * t^{-q} \rightarrow 0 @)@ as @(@ t \rightarrow 0 @)@. For this special case, @(@ q = 0 @)@, @(@ x^{(0)} @)@ x0 , @(@ X(t) = x^{(0)} @)@, and @[@ y^{(0)} = Y(t) = F[ X(t) ] = F( x^{(0)} ) @]@ which agrees with the specifications for y0 in the purpose above.
Input File: include/cppad/core/forward/forward_zero.omh