Changeset 2730 for trunk/src/PolynomialInterpolator1D.h
- Timestamp:
- 01/16/13 16:00:28 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/PolynomialInterpolator1D.h
r2727 r2730 18 18 19 19 /** 20 * Polynomial interpolation20 * Implementation of polynomial interpolation. 21 21 * @author TakeshiNakazato 22 22 */ 23 23 class PolynomialInterpolator1D : public Interpolator1D { 24 24 public: 25 // Default constructor. 25 26 PolynomialInterpolator1D(); 26 27 28 // Destructor. 27 29 virtual ~PolynomialInterpolator1D(); 28 30 31 // Perform interpolation. 32 // @param[in] x horizontal location where the value is evaluated 33 // by interpolation. 34 // @return interpolated value at x. 29 35 float interpolate(double x); 30 36 private: 31 float polint(double x, unsigned int loc, unsigned int left, unsigned int n); 37 // Perform polynomial interpolation. 38 // If (number of data points) > (polynomial order + 1), polynomial 39 // interpolation must be done in the sub-region that contains x. 40 // This method takes arguments that specifies sub-region to be used. 41 // @param[in] x horizontal location where the value is evaluated 42 // by interpolation. 43 // @param[in] left the leftmost index of sub-region. 44 // @param[in] n number of data points of sub-region. 45 // @return interpolated value at x. 46 float dopoly(double x, unsigned int left, unsigned int n); 32 47 }; 33 48
Note: See TracChangeset
for help on using the changeset viewer.