Specialisation for the zero-th order polynomial. More...
#include <polynomial.hpp>
Public Types | |
typedef Array< double, 1 > | Coefficients |
The coefficient container storage type. | |
Public Member Functions | |
Coefficients & | coefficients () |
Handle to the coefficient array, use to initialise the polynomial. | |
const Coefficients & | coefficients () const |
Non-modifiable handle to the coefficient array. | |
double | dderivative (const double &) const |
Access the second derivative directly (always returns 0).. | |
Polynomial< 0 > | derivative () const |
Derivative of a zero'th order polynomial is always zero. | |
double | derivative (const double &) const |
Access the derivative directly (always returns 0). | |
double | operator() (const double &) const |
Access the value of the polynomial at the specified point. | |
Polynomial () | |
Default constructor. | |
void | shift_horizontal (const double &) |
Horizontal shift transform. | |
virtual | ~Polynomial () |
Private Attributes | |
Coefficients | coeff |
Specialisation for the zero-th order polynomial.
Represents a zero'th order polynomial (scalar). It is necessary to handle this separately as the derivatives do not return lower degree polynomials.
Definition at line 250 of file polynomial.hpp.
typedef Array<double,1> ecl::Polynomial< 0 >::Coefficients |
The coefficient container storage type.
Definition at line 255 of file polynomial.hpp.
ecl::Polynomial< 0 >::Polynomial | ( | ) | [inline] |
Default constructor.
This initialises the scalar coefficient for the zero'th polynomial to zero.
Definition at line 266 of file polynomial.hpp.
virtual ecl::Polynomial< 0 >::~Polynomial | ( | ) | [inline, virtual] |
Definition at line 267 of file polynomial.hpp.
Coefficients& ecl::Polynomial< 0 >::coefficients | ( | ) | [inline] |
Handle to the coefficient array, use to initialise the polynomial.
This returns a handle to the coefficient array. Use this with the comma initialiser to conveniently set the polynomial.
Polynomial<0> p;
p.coefficients() = 1;
cout << p << endl; // 1.00
Definition at line 331 of file polynomial.hpp.
const Coefficients& ecl::Polynomial< 0 >::coefficients | ( | ) | const [inline] |
Non-modifiable handle to the coefficient array.
Definition at line 337 of file polynomial.hpp.
double ecl::Polynomial< 0 >::dderivative | ( | const double & | ) | const [inline] |
Access the second derivative directly (always returns 0)..
Access the values of the second derivative directly (always returns 0)..
Definition at line 310 of file polynomial.hpp.
Polynomial<0> ecl::Polynomial< 0 >::derivative | ( | ) | const [inline] |
Derivative of a zero'th order polynomial is always zero.
Derivative of a zero'th order polynomial is always zero.
Definition at line 290 of file polynomial.hpp.
double ecl::Polynomial< 0 >::derivative | ( | const double & | ) | const [inline] |
Access the derivative directly (always returns 0).
Access the values of the derivative directly (always returns 0)..
Definition at line 300 of file polynomial.hpp.
double ecl::Polynomial< 0 >::operator() | ( | const double & | ) | const [inline] |
Access the value of the polynomial at the specified point.
Access the value of the polynomial at the specified point.
Definition at line 346 of file polynomial.hpp.
void ecl::Polynomial< 0 >::shift_horizontal | ( | const double & | ) | [inline] |
Horizontal shift transform.
Normally, shifts the polynomial along the x axis by the specified offset, but in the case of this specialisation, does not change the polynomial.
Definition at line 278 of file polynomial.hpp.
Coefficients ecl::Polynomial< 0 >::coeff [private] |
Definition at line 348 of file polynomial.hpp.