to_json

View page source

Json AD Graph Corresponding to an ADFun Object

Syntax

json = fun . 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.