Public Member Functions | Public Attributes

ThirdOrderPoly Class Reference

Inherits MathFunction< float, float >.

List of all members.

Public Member Functions

 ThirdOrderPoly (float a_=0, float b_=0, float c_=0, float d_=0)
void setFromSamples (float y0, float y1, float y2, float y3)
float getValue (float pos) const
SecondOrderPolycreateDerivative () const
int getExtremePos (float &pos0, float &pos1) const

Public Attributes

float a
float b
float c
float d

Detailed Description

A class for 3rd order polynomials on the form:

a x^3 + b x^2 + c x + d


Constructor & Destructor Documentation

ThirdOrderPoly::ThirdOrderPoly ( float  a_ = 0,
float  b_ = 0,
float  c_ = 0,
float  d_ = 0 
) [inline]

Member Function Documentation

SecondOrderPoly* ThirdOrderPoly::createDerivative (  )  const [inline]
int ThirdOrderPoly::getExtremePos ( float &  pos0,
float &  pos1 
) const [inline]
float ThirdOrderPoly::getValue ( float  pos  )  const [inline, virtual]
void ThirdOrderPoly::setFromSamples ( float  y0,
float  y1,
float  y2,
float  y3 
) [inline]

Fits the polynomial through the points. The points are considered to be sampled with y0 at x=-1 and y3 at x=2


Member Data Documentation