CppAD: A C++ Algorithmic Differentiation Package  20130102
template<class Base>
void player< Base >::next_forward ( OpCode op,
const addr_t *&  op_arg,
size_t &  op_index,
size_t &  var_index 
) [inline]

Fetch the next operator during a forward sweep.

Use start_forward to initialize to the first operator; i.e., the BeginOp at the beginning of the recording.

Parameters:
opThe input value of op does not matter. Its output value is the next operator in the recording. For speed, next_forward does not check for the special case of op == CSumOp. In this case, the other return values from next_forward must be corrected by a call to forward_csum.
op_argThe input value of *op_arg does not matter. Its output value is the beginning of the vector of argument indices for this operation.
op_indexThe input value of op_index does not matter. Its output value is the index of the next operator in the recording. Thus the ouput value following the previous call to start_forward is one. In addition, the output value increases by one with each call to next_forward.
var_indexThe input value of var_index does not matter. Its output value is the index of the primary (last) result corresponding to the operator op.

Definition at line 361 of file player.hpp.

Referenced by ForJacSweep(), forward0sweep(), forward_sweep(), and optimize().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines