CppAD: A C++ Algorithmic Differentiation Package  20171217
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
template<typename Base , typename BoolVector >
void CppAD::local::subgraph::subgraph_info::init_rev ( const player< Base > *  play,
const BoolVector &  select_domain 

Initialize in_subgraph corresponding to a single dependent variable (and a selected set of independent variables).

Template Parameters
Basethis operation sequence was recording using AD<Base>.
playis the operation sequence corresponding to the ADFun<Base> function (it must correspond to map_user_op_).
select_domainis a vector with, size equal to the number of independent variables in the recording. It determines the selected independent variables.
We use depend_yes (depend_no) for the value n_dep_ (n_dep_ + 1). The important properties are that depend_yes < depend_no and for a valid indpendent variable index i_ind < depend_yes. The input size and elements of in_subgraph_ do not matter. If in_subgraph_[i_op] == depend_yes (depend_no), the result for this operator depends (does not depend) on the selected independent variables. Note that for user function call operators i_op, in_subgraph[i_op] is depend_no except for the first UserOp in the atomic function call sequence. For the first UserOp, it is depend_yes (depend_no) if any of the results for the call sequence depend (do not depend) on the selected independent variables. Except for UserOP, only operators with NumRes(op) > 0 have in_subgraph_ value depend_yes; e.g., comparision operators have in_subgraph_ value depend_no.
This vector is is set equal to the select_domain argument.
This vector is to to size n_dep_ and its values are set to false

Definition at line 65 of file init_rev.hpp.

Referenced by CppAD::local::subgraph::subgraph_sparsity().