POLYNOMIAL_2D Class Reference

2-dimensional simple polynomial. More...

#include <mi32/polynomial.h>

List of all members.

Public Member Functions

 POLYNOMIAL_2D ()
 ~POLYNOMIAL_2D ()
ERRVALUE AddSample (const DPOINT2D &pos, double value)
ERRVALUE AddSample (double x, double y, double value)
ERRVALUE Compute ()
double Evaluate (const DPOINT2D &pos) const
double Evaluate (double x, double y) const
const DOUBLE_ARRAY< double > & GetCoefficients () const
ERRVALUE Initialize (unsigned order)
ERRVALUE SetCoefficients (unsigned order, const double *Coeff)

Detailed Description

2-dimensional simple polynomial.

Polynomial is of the form: c0 + c1*x + c2*y + c3*x^2 + c4*x*y + c5*y^2 + c6*x^3 + c7*x^2*y + c8*x*y^2 + c9*y^3 + ... After construction must call Initialize() or SetCoefficients() before using other methods.


Constructor & Destructor Documentation

POLYNOMIAL_2D::POLYNOMIAL_2D (  ) 

Default constructor.

POLYNOMIAL_2D::~POLYNOMIAL_2D (  ) 

Destructor.


Member Function Documentation

ERRVALUE POLYNOMIAL_2D::AddSample ( const DPOINT2D pos,
double  value 
) [inline]

Add sample for polynomial computation.

Parameters:
pos Sample position
value Sample value
ERRVALUE POLYNOMIAL_2D::AddSample ( double  x,
double  y,
double  value 
)

Add sample for polynomial computation.

Parameters:
x Sample X position
y Sample Y position
value Sample value
ERRVALUE POLYNOMIAL_2D::Compute (  ) 

Compute polynomial fitted to previously added samples.

double POLYNOMIAL_2D::Evaluate ( const DPOINT2D pos  )  const [inline]

Evaluate polynomial at specified position.

Parameters:
pos Position
double POLYNOMIAL_2D::Evaluate ( double  x,
double  y 
) const

Evaluate polynomial at specified position.

Parameters:
y X position Y position
const DOUBLE_ARRAY<double>& POLYNOMIAL_2D::GetCoefficients (  )  const [inline]

Get polynomial coefficients.

Coefficients are sequenced by increasing sum of X and Y powers. Eg. value = c0 + [c1*x + c2*y] + [c3*x^2 + c4*x*y + c5*y^2] + [c6*x^3 + c7*x^2*y + c8*x*y^2 + c9*y^3] + ...

ERRVALUE POLYNOMIAL_2D::Initialize ( unsigned  order  ) 

Initialize.

Parameters:
order Polynomial order, maximum of 10
ERRVALUE POLYNOMIAL_2D::SetCoefficients ( unsigned  order,
const double *  Coeff 
)

Directly set polynomial coefficients.

Parameters:
order Polynomial order, maximum of 10
Coeff Coefficient array of size (order + 1) * (order + 2) / 2

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

Generated on Sun Oct 7 21:33:43 2012 for TNTsdk 2012 by  doxygen 1.6.1