|
CppAD: A C++ Algorithmic Differentiation Package
20171217
|
| void CppAD::local::forward2sweep | ( | const local::player< Base > * | play, |
| const size_t | q, | ||
| const size_t | r, | ||
| const size_t | n, | ||
| const size_t | numvar, | ||
| const size_t | J, | ||
| Base * | taylor, | ||
| const bool * | cskip_op, | ||
| const pod_vector< addr_t > & | var_by_load_op | ||
| ) |
Compute multiple directions forward mode Taylor coefficients.
| Base | The type used during the forward mode computations; i.e., the corresponding recording of operations used the type AD<Base>. |
| q | is the order of the Taylor coefficients that are computed during this call; q > 0. |
| r | is the number of Taylor coefficients that are computed during this call. |
| 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., play->num_var_rec(). |
| play | The information stored in play is a recording of the operations corresponding to the function
is the number of independent variables and is the number of dependent variables. |
| J | Is the number of columns in the coefficient matrix taylor. This must be greater than or equal one. |
| taylor | Input: For i = 1 , ... , numvar-1, taylor[ (J-1)*r*i + i + 0 ] is the zero order Taylor coefficient corresponding to the i-th variable and all directions. For i = 1 , ... , numvar-1, For k = 1 , ... , q-1, ell = 0 , ... , r-1, taylor[ (J-1)*r*i + i + (k-1)*r + ell + 1 ] is the k-th order Taylor coefficient corresponding to the i-th variabel and ell-th direction. Input: For i = 1 , ... , n, ell = 0 , ... , r-1, taylor[ (J-1)*r*i + i + (q-1)*r + ell + 1 ] is the q-th order Taylor coefficient corresponding to the i-th variable and ell-th direction (these are the independent varaibles). Output: For i = n+1 , ... , numvar-1, ell = 0 , ... , r-1, taylor[ (J-1)*r*i + i + (q-1)*r + ell + 1 ] is the q-th order Taylor coefficient corresponding to the i-th variable and ell-th direction. |
| cskip_op | Is a vector with size play->num_op_rec(). If cskip_op[i] is true, the operator with index i does not affect any of the dependent variable (given the value of the independent variables). |
| var_by_load_op | is a vector with size play->num_load_op_rec(). It is the variable index corresponding to each the load instruction. In the case where the index is zero, the instruction corresponds to a parameter (not variable). |
Definition at line 133 of file forward2sweep.hpp.
Referenced by CppAD::ADFun< Base >::Forward().