\(\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}} }\)
to_json¶
View page sourceJson AD Graph Corresponding to an ADFun Object¶
Syntax¶
to_json
()Prototype¶
template <class Base, class RecBase>
std::string CppAD::ADFun<Base,RecBase>::to_json(void)
fun¶
is the ADFun object.
json¶
The return value of json is a json_ad_graph representation of the corresponding function.
Base¶
is the type corresponding to this ADFun object; i.e., its calculations are done using the type Base .
RecBase¶
in the prototype above, RecBase is the same type as Base .
Restrictions¶
The to_json
routine is not yet implement for some
possible ADFun operators; see
Missing Operators .
Example¶
The file to_json.cpp is an example and test of this operation.