-------------------------------------------------- lines 8-63 of file: include/cppad/core/base2ad.hpp -------------------------------------------------- {xrst_begin base2ad} Create an AD Function From a Base Function ################################################ Syntax ****** | *af* = *f* . ``base2ad`` () See Also ******** :ref:`mul_level-name` Base **** This is the base type used to recorded the operation sequence in *f* and *af* ; i.e., the type ``AD`` < *Base* > was used to record the operation sequence. f * This object has prototype ``ADFun`` < *Base* > *f* It does it's derivative calculations using the type *Base* . af ** This object has prototype ``ADFun< AD<`` *Base* > , *Base* > *af* It has the same operation sequence as *f* , but it does it's derivative calculations using the type ``AD`` < *Base>* . This enables one to record new functions that are defined using derivatives of the function *f* . Initially, there are no Taylor coefficients stored in *af* and :ref:`af.size_order()` is zero. {xrst_toc_hidden example/general/base2ad.cpp example/general/base2vec_ad.cpp } Example ******* The file :ref:`base2ad.cpp-name` contains an example and test of this operation. VecAD ***** Forward mode on a ``base2ad`` function does not preserve :ref:`VecAD-name` operations (which might be expected); see the :ref:`base2vec_ad.cpp-name` example. {xrst_end base2ad}