<?xml version='1.0'?>
<html xmlns='http://www.w3.org/1999/xhtml'
      xmlns:math='http://www.w3.org/1998/Math/MathML'
>
<head>
<title>Speed Testing Second Derivative of a Polynomial</title>
<meta name="description" id="description" content="Speed Testing Second Derivative of a Polynomial"/>
<meta name="keywords" id="keywords" content=" link_poly polynomial speed test "/>
<style type='text/css'>
body { color : black }
body { background-color : white }
A:link { color : blue }
A:visited { color : purple }
A:active { color : purple }
</style>
<script type='text/javascript' language='JavaScript' src='_link_poly_xml.js'>
</script>
</head>
<body>
<table><tr>
<td>
<a href="http://www.coin-or.org/CppAD/" target="_top"><img border="0" src="_image.gif"/></a>
</td>
<td><a href="link_ode.xml" target="_top">Prev</a>
</td><td><a href="link_sparse_hessian.xml" target="_top">Next</a>
</td><td>
<select onchange='choose_across0(this)'>
<option>Index-&gt;</option>
<option>contents</option>
<option>reference</option>
<option>index</option>
<option>search</option>
<option>external</option>
</select>
</td>
<td>
<select onchange='choose_up0(this)'>
<option>Up-&gt;</option>
<option>CppAD</option>
<option>speed</option>
<option>speed_main</option>
<option>link_poly</option>
</select>
</td>
<td>
<select onchange='choose_down3(this)'>
<option>CppAD-&gt;</option>
<option>Install</option>
<option>Introduction</option>
<option>AD</option>
<option>ADFun</option>
<option>preprocessor</option>
<option>multi_thread</option>
<option>library</option>
<option>ipopt_solve</option>
<option>Example</option>
<option>speed</option>
<option>Appendix</option>
</select>
</td>
<td>
<select onchange='choose_down2(this)'>
<option>speed-&gt;</option>
<option>speed_main</option>
<option>speed_utility</option>
<option>speed_double</option>
<option>speed_adolc</option>
<option>speed_cppad</option>
<option>speed_fadbad</option>
<option>speed_sacado</option>
</select>
</td>
<td>
<select onchange='choose_down1(this)'>
<option>speed_main-&gt;</option>
<option>link_det_lu</option>
<option>link_det_minor</option>
<option>link_mat_mul</option>
<option>link_ode</option>
<option>link_poly</option>
<option>link_sparse_hessian</option>
<option>link_sparse_jacobian</option>
<option>microsoft_timer</option>
</select>
</td>
<td>link_poly</td>
<td>
<select onchange='choose_current0(this)'>
<option>Headings-&gt;</option>
<option>Prototype</option>
<option>Purpose</option>
<option>Method</option>
<option>Return Value</option>
<option>size</option>
<option>repeat</option>
<option>a</option>
<option>z</option>
<option>ddp</option>
<option>---..double</option>
</select>
</td>
</tr></table><br/>








<center><b><big><big>Speed Testing Second Derivative of a Polynomial</big></big></b></center>
<br/>
<b><big><a name="Prototype" id="Prototype">Prototype</a></big></b>

<br/>

<code><font color="blue"><span style='white-space: nowrap'>extern&#xA0;bool&#xA0;link_poly(<br/>
&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;size_t&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;</span></font><i><font color="black"><span style='white-space: nowrap'>size</span></font></i><font color="blue"><span style='white-space: nowrap'>&#xA0;&#xA0;&#xA0;&#xA0;,&#xA0;<br/>
&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;size_t&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;</span></font><i><font color="black"><span style='white-space: nowrap'>repeat</span></font></i><font color="blue"><span style='white-space: nowrap'>&#xA0;&#xA0;,&#xA0;<br/>
&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;CppAD::vector&lt;double&gt;&#xA0;&amp;</span></font><i><font color="black"><span style='white-space: nowrap'>a</span></font></i><font color="blue"><span style='white-space: nowrap'>&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;,<br/>
&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;CppAD::vector&lt;double&gt;&#xA0;&amp;</span></font><i><font color="black"><span style='white-space: nowrap'>z</span></font></i><font color="blue"><span style='white-space: nowrap'>&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;,<br/>
&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;CppAD::vector&lt;double&gt;&#xA0;&amp;</span></font><i><font color="black"><span style='white-space: nowrap'>ddp&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;<br/>
);<br/>
</span></font></i></code>
<br/>
<b><big><a name="Purpose" id="Purpose">Purpose</a></big></b>
<br/>
Each <a href="speed_main.xml#package" target="_top"><span style='white-space: nowrap'>package</span></a>

must define a version of this routine as specified below.
This is used by the <a href="speed_main.xml" target="_top"><span style='white-space: nowrap'>speed_main</span></a>
 program 
to run the corresponding speed and correctness tests.

<br/>
<br/>
<b><big><a name="Method" id="Method">Method</a></big></b>
<br/>
The same template routine <a href="poly.xml" target="_top"><span style='white-space: nowrap'>Poly</span></a>
 is used
by the different AD packages.

<br/>
<br/>
<b><big><a name="Return Value" id="Return Value">Return Value</a></big></b>
<br/>
If this speed test is not yet
supported by a particular 
<code><i><font color="black"><span style='white-space: nowrap'>package</span></font></i></code>
,
the corresponding return value for <code><font color="blue">link_poly</font></code> 
should be <code><font color="blue">false</font></code>.

<br/>
<br/>
<b><big><a name="size" id="size">size</a></big></b>
<br/>
The argument 
<code><i><font color="black"><span style='white-space: nowrap'>size</span></font></i></code>
 is the order of the polynomial
(the number of coefficients in the polynomial).

<br/>
<br/>
<b><big><a name="repeat" id="repeat">repeat</a></big></b>
<br/>
The argument 
<code><i><font color="black"><span style='white-space: nowrap'>repeat</span></font></i></code>
 is the number of different argument values
that the second derivative (or just the polynomial) will be computed at. 

<br/>
<br/>
<b><big><a name="a" id="a">a</a></big></b>
<br/>
The argument 
<code><i><font color="black"><span style='white-space: nowrap'>a</span></font></i></code>
 is a vector with 
<code><i><font color="black"><span style='white-space: nowrap'>size</span></font></i></code>
 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>i</i>-th element is coefficient of order 
<code><i><font color="black"><span style='white-space: nowrap'>i</span></font></i></code>
).

<br/>
<br/>
<b><big><a name="z" id="z">z</a></big></b>
<br/>
The argument 
<code><i><font color="black"><span style='white-space: nowrap'>z</span></font></i></code>
 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.

<br/>
<br/>
<b><big><a name="ddp" id="ddp">ddp</a></big></b>
<br/>
The argument 
<code><i><font color="black"><span style='white-space: nowrap'>ddp</span></font></i></code>
 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.

<br/>
<br/>
<b><a name="ddp.double" id="ddp.double">double</a></b>
<br/>
In the case where 
<code><i><font color="black"><span style='white-space: nowrap'>package</span></font></i></code>
 is <code><font color="blue">double</font></code>,
the output value of the element of 
<code><i><font color="black"><span style='white-space: nowrap'>ddp</span></font></i></code>
 
is the polynomial value (the second derivative is not computed).


<hr/>Input File: speed/src/link_poly.cpp

</body>
</html>
