|
template<class Base >
void reverse_csum_op |
( |
size_t |
d, |
|
|
size_t |
i_z, |
|
|
const size_t * |
arg, |
|
|
size_t |
nc_partial, |
|
|
Base * |
partial |
|
) |
| [inline] |
Compute reverse mode Taylor coefficients for result of op = CsumOp.
This operation is
z = p + x(1) + ... + x(m) - y(1) - ... - y(n).
H(y, x, w, ...) = G[ z(x, y), y, x, w, ... ]
- Template Parameters:
-
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. |
- Parameters:
-
d | order the highest order Taylor coefficient that we are computing the partial derivatives with respect to. |
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) . |
nc_partial | number of colums in the matrix containing all the partial derivatives. |
partial | Input: partial [ arg[2+i] * nc_partial + k ] for i = 1 , ... , m and k = 0 , ... , d is the partial derivative of G(z, y, x, w, ...) with respect to the k-th order Taylor coefficient corresponding to x(i)
Input: partial [ arg[2+m+i] * nc_partial + k ] for i = 1 , ... , n and k = 0 , ... , d is the partial derivative of G(z, y, x, w, ...) with respect to the k-th order Taylor coefficient corresponding to y(i)
Input: partial [ i_z * nc_partial + k ] for i = 1 , ... , n and k = 0 , ... , d is the partial derivative of G(z, y, x, w, ...) with respect to the k-th order Taylor coefficient corresponding to z .
Output: partial [ arg[2+i] * nc_partial + k ] for i = 1 , ... , m and k = 0 , ... , d is the partial derivative of H(y, x, w, ...) with respect to the k-th order Taylor coefficient corresponding to x(i)
Output: partial [ arg[2+m+i] * nc_partial + k ] for i = 1 , ... , n and k = 0 , ... , d is the partial derivative of H(y, x, w, ...) with respect to the k-th order Taylor coefficient corresponding to y(i) |
Definition at line 204 of file csum_op.hpp.
Referenced by ReverseSweep().
|