CppAD: A C++ Algorithmic Differentiation Package  20171217
template<typename Base >
template<typename VectorBase >
 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.

Template Parameters
 Base The type used during the forward mode computations; i.e., the corresponding recording of operations used the type AD. VectorBase is a Simple Vector class with eleements of type Base.
Parameters
 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.
Returns
contains Taylor coefficients for the dependent variables. The size of the return value `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.
taylor_
The Taylor coefficients up to order `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.