Changeset 2733 for trunk/src/CubicSplineInterpolator1D.h
- Timestamp:
- 01/16/13 20:00:01 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/CubicSplineInterpolator1D.h
r2730 r2733 21 21 * @author TakeshiNakazato 22 22 */ 23 class CubicSplineInterpolator1D : public Interpolator1D { 23 template <class T, class U> 24 class CubicSplineInterpolator1D : public Interpolator1D<T, U> { 24 25 public: 25 26 // Default constructor. … … 31 32 // Override Interpolator1D::setData. 32 33 // @see Interpolator1D::setData 33 void setData( double *x, float*y, unsigned int n);34 void setData(T *x, U *y, unsigned int n); 34 35 35 36 // Override Interpolator1D::setY. 36 37 // @see Interpolator1D::setY() 37 void setY( float*y, unsigned int n);38 void setY(U *y, unsigned int n); 38 39 39 40 // Perform interpolation. … … 41 42 // by interpolation. 42 43 // @return interpolated value at x. 43 float interpolate(doublex);44 U interpolate(T x); 44 45 private: 45 46 // Determine second derivatives of each point based on … … 53 54 // @param[in] i location index for x. 54 55 // @return interpolated value at x. 55 float dospline(doublex, unsigned int i);56 U dospline(T x, unsigned int i); 56 57 57 58 // Array to store second derivatives on the data points. 58 float*y2_;59 U *y2_; 59 60 60 61 // number of data points for second derivatives … … 66 67 67 68 } 69 70 #include "CubicSplineInterpolator1D.tcc" 71 68 72 #endif
Note: See TracChangeset
for help on using the changeset viewer.