CppAD: A C++ Algorithmic Differentiation Package
20171217
|
|
inline |
Multiple directions forward mode Taylor coefficients for op = CExpOp.
The C++ source code coresponding to this operation is
z = CondExpRel(y_0, y_1, y_2, y_3)
where Rel is one of the following: Lt, Le, Eq, Ge, Gt.
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. |
i_z | is the AD variable index corresponding to the variable z. |
arg | arg[0] is static cast to size_t from the enum type enum CompareOp { CompareLt, CompareLe, CompareEq, CompareGe, CompareGt, CompareNe }for this operation. Note that arg[0] cannot be equal to CompareNe. arg[1] & 1 If this is zero, y_0 is a parameter. Otherwise it is a variable. arg[1] & 2 If this is zero, y_1 is a parameter. Otherwise it is a variable. arg[1] & 4 If this is zero, y_2 is a parameter. Otherwise it is a variable. arg[1] & 8 If this is zero, y_3 is a parameter. Otherwise it is a variable. arg[2 + j ] for j = 0, 1, 2, 3 is the index corresponding to y_j. |
num_par | is the total number of values in the vector parameter. |
parameter | For j = 0, 1, 2, 3, if y_j is a parameter, parameter [ arg[2 + j] ] is its value. |
cap_order | number of columns in the matrix containing the Taylor coefficients. |
q | is order of the Taylor coefficient of z that we are computing. |
r | is the number of Taylor coefficient directions that we are computing. |
tpv = (cap_order-1) * r + 1
which is the number of Taylor coefficients per variabletaylor | Input: For j = 0, 1, 2, 3, k = 1, ..., q, if y_j is a variable then taylor [ arg[2+j] * tpv + 0 ] is the zero order Taylor coefficient corresponding to y_j and taylor [ arg[2+j] * tpv + (k-1)*r+1+ell is its k-th order Taylor coefficient in the ell-th direction. Input: For j = 0, 1, 2, 3, k = 1, ..., q-1, taylor [ i_z * tpv + 0 ] is the zero order Taylor coefficient corresponding to z and taylor [ i_z * tpv + (k-1)*r+1+ell is its k-th order Taylor coefficient in the ell-th direction. Output: taylor [ i_z * tpv + (q-1)*r+1+ell ] is the q-th order Taylor coefficient corresponding to z in the ell-th direction. |
Definition at line 482 of file cond_op.hpp.
Referenced by forward2sweep().