CppAD: A C++ Algorithmic Differentiation Package
20130102
|
void forward_csum_op | ( | size_t | d, |
size_t | i_z, | ||
const addr_t * | arg, | ||
size_t | num_par, | ||
const Base * | parameter, | ||
size_t | nc_taylor, | ||
Base * | taylor | ||
) | [inline] |
Compute forward mode Taylor coefficients for result of op = CsumOp.
This operation is
z = p + x(1) + ... + x(m) - y(1) - ... - y(n).
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. |
d | order of the Taylor coefficient that we are computing. |
i_z | variable index corresponding to the result for this operation; i.e. the row index in taylor corresponding to z. |
arg | arg[0] is the number of addition variables in this cummulative summation; i.e., m . arg[1] is the number of subtraction variables in this cummulative summation; i.e., m . parameter[ arg[2] ] is the parameter value p in this cummunative summation. arg[2+i] for i = 1 , ... , m is the value x(i) . arg[2+arg[0]+i] for i = 1 , ... , n is the value y(i) . |
num_par | is the number of parameters in parameter. |
parameter | is the parameter vector for this operation sequence. |
nc_taylor | number of colums in the matrix containing all the Taylor coefficients. |
taylor | Input: taylor [ arg[2+i] * nc_taylor + k ] for i = 1 , ... , m and k = 0 , ... , d is the k-th order Taylor coefficient corresponding to x(i) Input: taylor [ arg[2+m+i] * nc_taylor + k ] for i = 1 , ... , n and k = 0 , ... , d is the k-th order Taylor coefficient corresponding to y(i) Input: taylor [ i_z * nc_taylor + k ] for k = 0 , ... , d - 1 is the k-th order Taylor coefficient corresponding to z. Output: taylor [ i_z * nc_taylor + d ] is the d-th order Taylor coefficient corresponding to z. |
Definition at line 90 of file csum_op.hpp.
Referenced by forward0sweep(), and forward_sweep().