31 poly (nr_double_t _x, nr_double_t _y)
32 :
x(_x),
f0(_y) {
f1 =
f2 = 0; }
33 poly (nr_double_t _x, nr_double_t _f0, nr_double_t _f1)
34 :
x(_x),
f0(_f0),
f1(_f1) {
f2 = 0; }
35 poly (nr_double_t _x, nr_double_t _f0, nr_double_t _f1, nr_double_t _f2)
36 :
x(_x),
f0(_f0),
f1(_f1),
f2(_f2) { }
39 nr_double_t
eval (nr_double_t _x) {
40 nr_double_t dx = _x -
x;
return f0 + dx * (
f1 + dx *
f2);