CppAD: A C++ Algorithmic Differentiation Package
20171217
|
void CppAD::local::subgraph::subgraph_info::get_rev | ( | const player< Base > * | play, |
const vector< size_t > & | dep_taddr, | ||
addr_t | i_dep, | ||
pod_vector< addr_t > & | subgraph | ||
) |
Get the subgraph corresponding to a dependent variables (and a selected set of independent variables).
Base | this operation sequence was recording using AD<Base>. |
play | is the operation sequence corresponding to the ADFun<Base> function. |
dep_taddr | is the vector mapping user dependent variable indices to the correpsonding variable in the recording. |
i_dep | is the user index for his dependent variable; that i_dep < n_dep_. |
subgraph | the input size and contents of this vector do not matter. Repeated calls with the same subgraph vector should reduce the amount of memory allocation. Upon return it contains the operator indices for the subgraph corresponding to the dependent and the selected independent variables. Only selected independent variable operators InvOp are included in the subgraph. Furthermore the operator indices in subgraph are unique; i.e., if i_op != j_op then subgraph[i_op] != subgraph[j_op]. |
Definition at line 84 of file get_rev.hpp.
Referenced by CppAD::local::subgraph::subgraph_sparsity().