Prev Next

@(@\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 .
Create an AD<Base> Function From a Base Function

Syntax
af = f.base2ad()

See Also
mul_level

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<
Basef
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 af.size_order() is zero.

Example
The file base2ad.cpp contains an example and test of this operation.

VecAD
Forward mode on a base2ad function does not preserve VecAD operations (which might be expected); see the base2vec_ad.cpp example.
Input File: include/cppad/core/base2ad.hpp