CppAD: A C++ Algorithmic Differentiation Package
20130102
|
void ReverseSweep | ( | size_t | d, |
size_t | n, | ||
size_t | numvar, | ||
player< Base > * | Rec, | ||
size_t | J, | ||
const Base * | Taylor, | ||
size_t | K, | ||
Base * | Partial | ||
) |
Compute derivative of arbitrary order forward mode Taylor coefficients.
Base | base type for the operator; i.e., this operation sequence was recorded using AD< Base > and computations by this routine are done using type Base. |
d | is the highest order Taylor coefficients that we are computing the derivative of. |
n | is the number of independent variables on the tape. |
numvar | is the total number of variables on the tape. This is also equal to the number of rows in the matrix Taylor; i.e., Rec->num_rec_var(). |
Rec | The information stored in Rec is a recording of the operations corresponding to the function
![]() ![]() ![]()
![]() ![]() ![]() ![]() ![]() The object Rec is effectly constant. There is an exception to this, while palying back the tape the object Rec holds information about the current location with in the tape and this changes during palyback. |
J | Is the number of columns in the coefficient matrix Taylor. This must be greater than or equal d + 1. |
Taylor | For i = 1 , ... , numvar, and for k = 0 , ... , d, Taylor [ i * J + k ] is the k-th order Taylor coefficient corresponding to variable with index i on the tape. The value ![]() ![]() |
K | Is the number of columns in the partial derivative matrix Partial. It must be greater than or equal d + 1. |
Partial | Input: The last ![]() ![]() ![]() Temporary: For i = n+1 , ... , numvar - 1 and for k = 0 , ... , d, the value of Partial [ i * K + k ] is used for temporary work space and its output value is not defined. Output: For j = 1 , ... , n and for k = 0 , ... , d, Partial [ j * K + k ] is the partial derivative of ![]() ![]() |
Definition at line 133 of file reverse_sweep.hpp.
Referenced by ADFun< Base >::Reverse().