CppAD: A C++ Algorithmic Differentiation Package
20171217
|
|
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.
Base | base type for the operator; i.e., this operation was recorded using AD< Base > and computations by this routine are done using type Base . |
s_out | the results are printed on this output stream. |
arg | arg[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] * cap_order + 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] * cap_order + 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_text | is the total number of text characters on the tape (only used for error checking). |
text | Input: 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_par | is the total number of values in the parameter vector |
parameter | Contains the value of parameters. |
cap_order | number of colums in the matrix containing all the Taylor coefficients. |
taylor | Contains the value of variables. |
Definition at line 103 of file print_op.hpp.
Referenced by forward0sweep(), and forward1sweep().