CppAD: A C++ Algorithmic Differentiation Package  20130102
template<class Base >
CPPAD_BEGIN_NAMESPACE void forward_pri_0 ( std::ostream &  s_out,
size_t  i_z,
const addr_t *  arg,
size_t  num_text,
const char *  text,
size_t  num_par,
const Base *  parameter,
size_t  nc_taylor,
const Base *  taylor 
) [inline]

Print operation for parameters; i.e., op = PriOp.

The C++ source code corresponding to this operation is

	f.Forward(0, x)
	PrintFor(before, var)
	PrintFor(pos, before, var, after)

The PrintFor call puts the print operation on the tape and the print occurs during the zero order forward mode computation.

Template Parameters:
Basebase type for the operator; i.e., this operation was recorded using AD< Base > and computations by this routine are done using type Base .
Parameters:
s_outthe results are printed on this output stream.
i_zis the index of the next variable on the tape (only used for error checking).
argarg[0] & 1
If this is zero, pos is a parameter. Otherwise it is a variable.
arg[0] & 2
If this is zero, var is a parameter. Otherwise it is a variable.

arg[1]
If pos is a parameter, parameter[arg[1]] is its value. Othwise taylor[ arg[1] * nc_taylor + 0 ] is the zero order Taylor coefficient for pos.

arg[2]
index of the text to be printed before var if pos is not a positive value.

arg[3]
If var is a parameter, parameter[arg[3]] is its value. Othwise taylor[ arg[3] * nc_taylor + 0 ] is the zero order Taylor coefficient for var.

arg[4]
index of the text to be printed after var if pos is not a positive value.
num_textis the total number of text characters on the tape (only used for error checking).
textInput: text[arg[1]] is the first character of the text that will be printed. All the characters from there to (but not including) the first '\0' are printed.
num_paris the total number of values in the parameter vector
parameterContains the value of parameters.
nc_taylornumber of colums in the matrix containing all the Taylor coefficients.
taylorContains the value of variables.
Checked Assertions:
  • NumArg(PriOp) == 5
  • NumRes(PriOp) == 0
  • text != CPPAD_NULL
  • arg[1] < num_text
  • if pos is a variable, arg[1] < i_z, otherwise arg[1] < num_par
  • if var is a variable, arg[3] < i_z, otherwise arg[3] < num_par

Definition at line 107 of file print_op.hpp.

Referenced by forward0sweep(), and forward_sweep().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines