CppAD: A C++ Algorithmic Differentiation Package
20171217
|
void CppAD::local::forward1sweep | ( | const local::player< Base > * | play, |
std::ostream & | s_out, | ||
const bool | print, | ||
const size_t | p, | ||
const size_t | q, | ||
const size_t | n, | ||
const size_t | numvar, | ||
const size_t | J, | ||
Base * | taylor, | ||
bool * | cskip_op, | ||
pod_vector< addr_t > & | var_by_load_op, | ||
size_t | compare_change_count, | ||
size_t & | compare_change_number, | ||
size_t & | compare_change_op_index | ||
) |
Compute arbitrary order 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>. |
s_out | Is the stream where output corresponding to PriOp operations will be written. |
If print is false, suppress the output that is otherwise generated by the c PriOp instructions. | |
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
![]() ![]() |
J | Is the number of columns in the coefficient matrix taylor. This must be greater than or equal one. |
cskip_op | Is a vector with size play->num_op_rec(). p = 0 In this case, the input value of the elements does not matter. Upon return, 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). p > 0 In this case cskip_op is not modified and has the same meaning as its return value above. |
var_by_load_op | is a vector with size play->num_load_op_rec(). p == 0 In this case, The input value of the elements does not matter. Upon return, it is the variable index corresponding the result for each load operator. In the case where the index is zero, the load operator results in a parameter (not a variable). Note that the is no variable with index zero on the tape. p > 0 In this case var_by_load_op is not modified and has the meaning as its return value above. |
p | is the lowest order of the Taylor coefficients that are computed during this call. |
q | is the highest order of the Taylor coefficients that are computed during this call. |
taylor | Input: For i = 1 , ... , numvar-1 , k = 0 , ... , p-1 , taylor[ J*i + k] is the k-th order Taylor coefficient corresponding to the i-th variable. Input: For i = 1 , ... , n , k = p , ... , q , taylor[ J*j + k] is the k-th order Taylor coefficient corresponding to the i-th variable (these are the independent varaibles). Output: For i = n+1 , ... , numvar-1 , and k = 0 , ... , p-1 , taylor[ J*i + k] is the k-th order Taylor coefficient corresponding to the i-th variable. |
compare_change_count | Is the count value for changing number and op_index during zero order foward mode. |
compare_change_number | If p is non-zero, this value is not changed, otherwise: If compare_change_count is zero, this value is set to zero, otherwise: this value is set to the number of comparision operations that have a different result from when the information in play was recorded. |
compare_change_op_index | if p is non-zero, this value is not changed, otherwise: If compare_change_count is zero, this value is set to zero. Otherwise it is the operator index (see forward_next) for the count-th comparision operation that has a different result from when the information in play was recorded. |
Definition at line 181 of file forward1sweep.hpp.
Referenced by CppAD::ADFun< Base >::Forward().