Prev Next link_poly

@(@\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 .
Speed Testing Second Derivative of a Polynomial

Prototype

extern bool link_poly(
    size_t                     size     ,
    size_t                     repeat   ,
    CppAD::vector<double>&     a        ,
    CppAD::vector<double>&     z        ,
    CppAD::vector<double>&     ddp
);

Purpose
Each package must define a version of this routine as specified below. This is used by the speed_main program to run the corresponding speed and correctness tests.

Method
The same template routine Poly is used by the different AD packages.

Return Value
If this speed test is not yet supported by a particular package , the corresponding return value for link_poly should be false.

size
The argument size is the order of the polynomial (the number of coefficients in the polynomial).

repeat
The argument repeat is the number of different argument values that the second derivative (or just the polynomial) will be computed at.

a
The argument a is a vector with size elements. The input value of its elements does not matter. The output value of its elements is the coefficients of the polynomial that is differentiated (i-th element is coefficient of order i ).

z
The argument z is a vector with one element. The input value of the element does not matter. The output of its element is the polynomial argument value were the last second derivative (or polynomial value) was computed.

ddp
The argument ddp is a vector with one element. The input value of its element does not matter. The output value of its element is the second derivative of the polynomial with respect to it's argument value.

double
In the case where package is double, the output value of the element of ddp is the polynomial value (the second derivative is not computed).
Input File: speed/src/link_poly.cpp