@(@\newcommand{\W}[1]{ \; #1 \; }
\newcommand{\R}[1]{ {\rm #1} }
\newcommand{\B}[1]{ {\bf #1} }
\newcommand{\D}[2]{ \frac{\partial #1}{\partial #2} }
\newcommand{\DD}[3]{ \frac{\partial^2 #1}{\partial #2 \partial #3} }
\newcommand{\Dpow}[2]{ \frac{\partial^{#1}}{\partial {#2}^{#1}} }
\newcommand{\dpow}[2]{ \frac{ {\rm d}^{#1}}{{\rm d}\, {#2}^{#1}} }@)@
This is cppad-20221105 documentation. Here is a link to its
current documentation
.
Switching Between Variables and Dynamic Parameters: Example and Test
Function
For each ADFun
object there is a corresponding function
@(@
f(x, p)
@)@ where
x
is the vector of independent variables
and
p
is the vector of
independent dynamic
parameters.
Convert a Graph to a Function
The from_graph
routine can be used to convert a graph back
to a function. During this conversion, it is possible to change
dynamic parameters to variables and variables to dynamic parameters;
see dyn2var
and
var2dyn
in the
from_graph documentation.
Note that many such conversions can be done
using the same cpp_ad_graph object.