dyn2var
is a vector with size equal to the number of independent dynamic parameters
in the graph; i.e., the size of p
.
It specifies which independent dynamic parameters in the graph are
independent variables in the function
fun
.
var2dyn
is a vector with size equal to the number of independent variables
in the graph; i.e., the size of x
.
It specifies which independent variables in the graph are
independent dynamic parameters in the function
fun
.
fun
It
dyn2var
and
var2dyn
are not present,
the independent dynamic parameters and independent variables in
fun
are the same as for the graph.
Otherwise, they are described below.
m_true, m_false
Let
m_true
(
m_false
) be the number of true (false)
elements of
dyn2var
.
n_true, n_false
Let
n_true
(
n_false
) be the number of true (false)
elements of
var2dyn
.
Independent Dynamic Parameters
The first
m_false
independent dynamic parameters in
fun
correspond to the false components of
dyn2var
and have the same order as in the graph.
The next
n_true
independent dynamic parameters in
fun
correspond to the true components of
var2dyn
and have the same order as in the graph.
Independent Variables
The first
m_true
independent variables in
fun
correspond to the true components of
dyn2var
and have the same order as in the graph.
The next
n_false
independent variables in
fun
correspond to the false components of
var2dyn
and have the same order as in the graph.
Examples
The file switch_var_dyn.cpp
contains an example and test
of this routine.
For simpler examples, that do not change the dynamic parameters and variables;
see graph_op_enum examples
.
Input File: include/cppad/core/graph/from_graph.hpp