Public Types | Public Member Functions | Private Attributes | List of all members
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. More...
 

Public Member Functions

Coefficientscoefficients ()
 Handle to the coefficient array, use to initialise the polynomial. More...
 
const Coefficientscoefficients () const
 Non-modifiable handle to the coefficient array. More...
 
double dderivative (const double &) const
 Access the second derivative directly (always returns 0).. More...
 
Polynomial< 0 > derivative () const
 Derivative of a zero'th order polynomial is always zero. More...
 
double derivative (const double &) const
 Access the derivative directly (always returns 0). More...
 
double operator() (const double &) const
 Access the value of the polynomial at the specified point. More...
 
 Polynomial ()
 Default constructor. More...
 
void shift_horizontal (const double &)
 Horizontal shift transform. More...
 
virtual ~Polynomial ()
 

Private Attributes

Coefficients coeff
 

Detailed Description

template<>
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.

Member Typedef Documentation

◆ Coefficients

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

The coefficient container storage type.

Definition at line 284 of file polynomial.hpp.

Constructor & Destructor Documentation

◆ Polynomial()

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.

◆ ~Polynomial()

virtual ecl::Polynomial< 0 >::~Polynomial ( )
inlinevirtual

Definition at line 296 of file polynomial.hpp.

Member Function Documentation

◆ coefficients() [1/2]

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.

◆ coefficients() [2/2]

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.

◆ dderivative()

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.

◆ derivative() [1/2]

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.

◆ derivative() [2/2]

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.

◆ operator()()

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.

◆ shift_horizontal()

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.

Member Data Documentation

◆ coeff

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:


ecl_geometry
Author(s): Daniel Stonier
autogenerated on Mon Feb 28 2022 22:18:49