Changeset 2733 for trunk/src/BufferedLinearInterpolator1D.h
- Timestamp:
- 01/16/13 20:00:01 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/BufferedLinearInterpolator1D.h
r2730 r2733 21 21 * @author TakeshiNakazato 22 22 */ 23 class BufferedLinearInterpolator1D : public Interpolator1D { 23 template <class T, class U> 24 class BufferedLinearInterpolator1D : public Interpolator1D<T, U> { 24 25 public: 25 26 // Default constructor. … … 34 35 // @param[in] n number of data. 35 36 // @see Interpolator1D::setData() 36 void setData( double *x, float*y, unsigned int n);37 void setData(T *x, U *y, unsigned int n); 37 38 38 39 // Set horizontal data (x). … … 40 41 // @param[in] n number of data. 41 42 // @see Interpolator1D::setX() 42 void setX( double*x, unsigned int n);43 void setX(T *x, unsigned int n); 43 44 44 45 // Perform interpolation. … … 47 48 // @return interpolated value at x. 48 49 // @see Interpolator1D::interpolate() 49 float interpolate(doublex);50 U interpolate(T x); 50 51 51 52 private: 52 53 // Numerical factor for linear interpolation. 53 doublefactor_;54 T factor_; 54 55 55 56 // Previous location. 56 doublexold_;57 T xold_; 57 58 58 59 // Previous location as an index … … 64 65 65 66 } 67 68 #include "BufferedLinearInterpolator1D.tcc" 69 66 70 #endif
Note: See TracChangeset
for help on using the changeset viewer.