Public Member Functions | Public Attributes

SecondOrderPoly Class Reference

Inherits MathFunction< float, float >.

List of all members.

Public Member Functions

 SecondOrderPoly (float a_=0, float b_=0, float c_=0)
void setFromSamples (float y0, float y1, float y2)
float getValue (float pos) const
float getExtremePos () const
int getRoots (float &pos0, float &pos1) const
LineParameters< float > * createDerivative () const

Public Attributes

float a
float b
float c

Detailed Description

A class for 2nd order polynomials on the form:

a x^2 + b x + c


Constructor & Destructor Documentation

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

Member Function Documentation

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

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


Member Data Documentation