FuncApprox Class Reference

To set function approximation methods. More...

#include <FuncApprox.h>

Public Member Functions

 FuncApprox ()
 Default constructor.
 
 ~FuncApprox ()
 Destructor.
 
void setLagrange (int n, const Vect< real_t > &x, const Vect< real_t > &y, Fct &f)
 Define Lagrange interpolation.
 
void setLeastSquare (const vector< Fct * > &f, const Vect< real_t > &x, const Vect< real_t > &y, Vect< real_t > &a)
 Define least square approximation using given basis functions.
 
void setLeastSquare (DMatrix< real_t > &B, const Vect< real_t > &y, Vect< real_t > &a)
 Define least square approximation with given least square matrix.
 
void setLeastSquare (const Vect< real_t > &x, const Vect< real_t > &y, size_t N, Vect< real_t > &a)
 Define least square approximation using polynomial regression.
 
void setLeastSquare (const Vect< real_t > &x, const Vect< real_t > &y, real_t &a0, real_t &a1)
 Constructor foDefine least square approximation using linear regression.
 
void getLeastSquare (Fct &f)
 Compute the resulting least square fitting function.
 
void setBSpline (size_t n, size_t c, size_t np, const Vect< real_t > &b, Vect< real_t > &p)
 Define BSpline approximation.
 
void setBSplineSurface (size_t m, size_t n, size_t c, size_t d, size_t npu, size_t npw, const Vect< real_t > &b, Vect< real_t > &p)
 Define BSpline surface modelling.
 
void setBezier (size_t n, size_t nc, const Vect< real_t > &b, Vect< real_t > &p)
 Define Bezier modelling.
 
void setBezierSurface (size_t m, size_t n, size_t npu, size_t npw, const Vect< real_t > &b, Vect< real_t > &p)
 Define Bezier surface modelling.
 
void setNurbs (size_t n, size_t c, size_t np, const Vect< real_t > &b, const Vect< real_t > &h, Vect< real_t > &p)
 Define for Nurbs modelling.
 
void setNurbsSurface (size_t m, size_t n, size_t c, size_t d, size_t npu, size_t npw, const Vect< real_t > &b, Vect< real_t > &p)
 Define Nurbs surface modelling.
 
int run ()
 Run approximation process.
 

Detailed Description

To set function approximation methods.

This class enables using approximation methods for functions.

The algorithms used in this class are largely inspired from the book: An Introduction to NURBS, by David F. Rogers. Copyright (C) 2000 David F. Rogers,