Prev Next forward0sweep

Zero Order Forward Computation of Taylor Coefficients

Syntax
size_t forward0sweep(
     bool 
print,
     size_t 
numvar,
     player<
Base> *Rec,
     size_t 
J,
     Base *
Taylor,
)


Return Value
The return value is equal to the number of AD<Base> comparison operations have a different result from when the information in Rec was recorded.

Rec
The information stored in Rec is a recording of the operations corresponding to a function  \[
     F : B^n \rightarrow B^m
\] 


print
If print is false, suppress the output that is otherwise generated by the PripOp and PrivOp instructions.

numvar
is the number of rows in the matrix Taylor. It must also be equal to Rec->TotNumVar().

J
Is the number of columns in the coefficient matrix Taylor. This must be greater than or equal  1 .

On Input

Independent Variables and Operators
The independent variable records come first. For  i = 1, \ldots , n
field Value
Taylor[0 * J] this index zero variable is not used
Rec->GetOp(0) the operator with index zero must be a NonOp
Taylor[i * J] zero order Taylor coefficient for independent variable with index i
Rec->GetOp(i) the operator with index i must be a InvOp

Other Variables and Operators
The other variables follow the independent variables. For  i = n+1, \ldots , numvar-1 ,
field Value
Taylor[i * J] value of the variable with index i
Rec->GetOp(i) any operator except for InvOp

On Output

Rec
None of the values stored in Rec are modified.

Independent Variables
For  i = 1, \ldots , n and  j = 0 , \ldots , J-1 , Taylor[i * J + j] is not modified.

Other Variables
For  i = n+1, \ldots , numvar-1 , Taylor[i * J] is set equal to the zero order Taylor coefficient for the variable with index i.
Input File: cppad/local/forward0sweep.hpp