ecl::Polynomial< 0 > Class Template Reference

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 |

class ecl::Polynomial< 0 >

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.

**See also:**- Polynomial, Math::Polynomials.

Definition at line 279 of file polynomial.hpp.

typedef Array<double,1> ecl::Polynomial< 0 >::Coefficients |

The coefficient container storage type.

Definition at line 284 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 295 of file polynomial.hpp.

virtual ecl::Polynomial< 0 >::~Polynomial | ( | ) | ` [inline, virtual]` |

Definition at line 296 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
```

**Returns:**- Coefficients& : reference to the co-efficient array.

Definition at line 360 of file polynomial.hpp.

const Coefficients& ecl::Polynomial< 0 >::coefficients | ( | ) | const` [inline]` |

Non-modifiable handle to the coefficient array.

**Returns:**- const Coefficients& : non-modifiable reference to the co-efficient array.

Definition at line 366 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)..

**Returns:**- double : 2nd derivative of a scalar is always 0.0.

Definition at line 339 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.

**Returns:**- Polynomial<0> : the zero polynomial.

Definition at line 319 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)..

**Returns:**- double : derivative of a scalar is always 0.0.

Definition at line 329 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.

**Returns:**- double : the value of a scalar is always a_0.

Definition at line 375 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 307 of file polynomial.hpp.

Coefficients ecl::Polynomial< 0 >::coeff` [private]` |

Definition at line 377 of file polynomial.hpp.

The documentation for this class was generated from the following file: