Changeset 2733 for trunk/src/Interpolator1D.h
- Timestamp:
- 01/16/13 20:00:01 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/Interpolator1D.h
r2731 r2733 21 21 * @author TakeshiNakazato 22 22 */ 23 class Interpolator1D {23 template <class T, class U> class Interpolator1D { 24 24 public: 25 25 // Default constructor. … … 33 33 // @param[in] y pointer to vertical data. 34 34 // @param[in] n number of data. 35 void setData( double *x, float*y, unsigned int n);35 void setData(T *x, U *y, unsigned int n); 36 36 37 37 // Set horizontal data (x). 38 38 // @param[in] x pointer to horizontal data. 39 39 // @param[in] n number of data. 40 void setX( double*x, unsigned int n);40 void setX(T *x, unsigned int n); 41 41 42 42 // Set vertical data (y). 43 43 // @param[in] y pointer to vertical data. 44 44 // @param[in] n number of data. 45 void setY( float*y, unsigned int n);45 void setY(U *y, unsigned int n); 46 46 47 47 // Reset object. … … 58 58 // by interpolation. 59 59 // @return interpolated value at x. 60 virtual float interpolate(doublex) = 0;60 virtual U interpolate(T x) = 0; 61 61 62 62 protected: … … 65 65 // @return location as an index. 66 66 // @see Locator::locate() 67 unsigned int locate( doublex);67 unsigned int locate(T x); 68 68 69 69 // Query function whether the object is ready to interpolate. … … 81 81 82 82 // Horizontal data. 83 double*x_;83 T *x_; 84 84 85 85 // Vertical data. 86 float*y_;86 U *y_; 87 87 88 88 // Pointer to the Locator object. 89 Locator< double> *locator_;89 Locator<T> *locator_; 90 90 }; 91 91 92 92 } 93 94 #include "Interpolator1D.tcc" 95 93 96 #endif
Note: See TracChangeset
for help on using the changeset viewer.