|
CppAD: A C++ Algorithmic Differentiation Package
20171217
|
| VectorBase CppAD::ADFun< Base >::Forward | ( | size_t | q, |
| size_t | r, | ||
| const VectorBase & | xq | ||
| ) |
forward mode user API, one order multiple directions.
One order, multiple directions, forward mode Taylor coefficieints.
| Base | The type used during the forward mode computations; i.e., the corresponding recording of operations used the type AD<Base>. |
| VectorBase | is a Simple Vector class with eleements of type Base. |
| q | is the order for this forward mode computation, q > 0. There must be at least q Taylor coefficients per variable before this call. After this call there will be q+1 Taylor coefficients per variable. |
| r | is the number of directions for this calculation. If q != 1, r must be the same as in the previous call to Forward where q was equal to one. |
| xq | contains Taylor coefficients for the independent variables. The size of xq must either be r*n, For j = 0 , ... , n-1, ell = 0, ... , r-1, xq[ ( r*j + ell ] is the q-th order coefficient for the j-th independent variable and the ell-th direction. |
y is r*m. For i = 0, ... , m-1, ell = 0, ... , r-1, y[ r*i + ell ] is the q-th order coefficient for the i-th dependent variable and the ell-th direction.q-1 are inputs and the coefficents of order q are outputs. Let N = num_var_tape_, and C = cap_order_taylor_. Note that for i = 1 , ..., N-1, taylor_[ (C-1)*r*i + i + 0 ] is the zero order cofficent, for the i-th varaible, and all directions. For i = 1 , ..., N-1, k = 1 , ..., q, ell = 0 , ..., r-1, taylor_[ (C-1)*r*i + i + (k-1)*r + ell + 1 ] is the k-th order cofficent, for the i-th varaible, and ell-th direction. (The first independent variable has index one on the tape and there is no variable with index zero.) Definition at line 324 of file forward.hpp.
Referenced by CppAD::BenderQuad(), CppAD::ipopt::solve_callback< Dvector, ADvector, FG_eval >::cache_new_x(), CppAD::ipopt::solve_callback< Dvector, ADvector, FG_eval >::eval_jac_g(), CppAD::FunCheck(), and CppAD::JacobianFor().