CppAD: A C++ Algorithmic Differentiation Package  20130918
template<class Base >
size_t CppAD::forward0sweep ( std::ostream &  s_out,
bool  print,
size_t  n,
size_t  numvar,
player< Base > *  play,
size_t  J,
Base *  taylor,
bool *  cskip_op,
pod_vector< addr_t > &  var_by_load_op 
)

Compute zero order forward mode Taylor coefficients.

Template Parameters:
BaseThe type used during the forward mode computations; i.e., the corresponding recording of operations used the type AD<Base>.
Parameters:
s_outIs the stream where output corresponding to PriOp operations will be written.
printIf print is false, suppress the output that is otherwise generated by the c PriOp instructions.
nis the number of independent variables on the tape.
numvaris the total number of variables on the tape. This is also equal to the number of rows in the matrix taylor; i.e., play->num_var_rec().
playThe information stored in play is a recording of the operations corresponding to the function

\[ F : {\bf R}^n \rightarrow {\bf R}^m \]

where $ n $ is the number of independent variables and $ m $ is the number of dependent variables.

The object play is effectly constant. The exception to this is that while palying back the tape the object play holds information about the current location with in the tape and this changes during palyback.
JIs the number of columns in the coefficient matrix taylor. This must be greater than or equal one.
taylor
Input: For i = 1 , ... , n, taylor [i * J + 0] variable with index j on the tape (these are the independent variables).

Output: For i = n + 1, ... , numvar - 1, taylor [i * J + 0] is the zero order Taylor coefficient for the variable with index i on the tape.
cskip_opIs a vector with size play->num_op_rec(). The input value of the elements does not matter. Upon return, if cskip_op[i] is true, the operator index i does not affect any of the dependent variable (given the value of the independent variables).
var_by_load_opIs a vector with size play->num_load_op_rec(). The input value of the elements does not matter. Upon return, it is the variable index corresponding the result for each load operator. In the case where the index is zero, the load operator results in a parameter (not a variable). Note that the is no variable with index zero on the tape.
Returns:
The return value is equal to the number of ComOp operations that have a different result from when the information in play was recorded. (Note that if NDEBUG is true, there are no ComOp operations in play and hence this return value is always zero.)

Definition at line 136 of file forward0sweep.hpp.

Referenced by CppAD::ADFun< Base >::ADFun(), and CppAD::ADFun< Base >::Forward().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines