![]() |
Prev | Next | link_poly |
extern bool link_poly(
size_t size ,
size_t repeat ,
bool retape ,
CppAD::vector<double> &a ,
CppAD::vector<double> &z ,
CppAD::vector<double> &ddp
);
package
,
the corresponding return value for link_poly
should be false
.
size
is the order of the polynomial
(the number of coefficients in the polynomial).
repeat
is the number of different argument values
that the second derivative (or just the polynomial) will be computed at.
retape
is true,
the operation sequence is considered to change for each repetition.
Thus an AD package can not use one recording of the
operation sequence to compute the gradient for all of the repetitions.
retape
is false,
the operation sequence is known to be the same for each repetition.
Thus an AD package may use one recording of the
operation sequence to compute the gradient for all of the repetitions.
a
is a vector with
size*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
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
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.
package
is double
,
the output value of the element of
ddp
is the polynomial value (the second derivative is not computed).