#ifndef NUMMODELPOLYNOMIAL_HH #define NUMMODELPOLYNOMIAL_HH //////////////////////////////////////////////////////////////////////////// //! author="Robert Crida" //! lib=NumModelBasicModels //! date="21/4/1998" //! userlevel=Normal //! example=testNumModel.cc //! file="amma/PatternRec/FuncTools/Model/BasicModels/NumModelPolynomial.hh" //! docentry="Numerical Methods.Multidimensional Models.Implementation" //! rcsid="$Id: NumModelPolynomial.hh,v 1.6 2000/02/16 14:10:29 ees1cg Exp $" #include "amma/Num/NumModel.hh" #include "amma/Num/NumModelPolynomialB.hh" //: Model for fitting n-dimensional polynomials. // // It provides a class implementation fitting functions of the form Y=f(X) // where each element of Y is an k'th polynomial of the elements of X.
// // For example, when a second order polynomial is selected and X and Y have // 2 and 3 elements respectively and A is the matrix of model weights then:
//
// Y[0] = A[0][0] + A[0][1]X[0] + A[0][2]X[0]^2 + A[0][3]X[1] + A[0][4]X[1]^2 // Y[1] = A[1][0] + A[1][1]X[0] + A[1][2]X[0]^2 + A[1][3]X[1] + A[1][4]X[1]^2 // Y[2] = A[2][0] + A[2][1]X[0] + A[2][2]X[0]^2 + A[2][3]X[1] + A[2][4]X[1]^2 //// Note that in this model there are no cross parameter terms regardless of // the model order selected, ie each term is only a power of an individual // element of X. class NumModelPolynomialC: public NumModelC { public: NumModelPolynomialC (UIntT order) :NumModelC(*(new NumModelPolynomialBC (order))) {} //: Constructor //!param: order - the order of the polynomial for each term of X }; #endif