Changeset 2731 for trunk/src/HuntLocator.h
- Timestamp:
- 01/16/13 16:45:43 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/HuntLocator.h
r2730 r2731 21 21 * @author TakeshiNakazato 22 22 */ 23 class HuntLocator : public Locator{23 template <class T> class HuntLocator : public Locator<T> { 24 24 public: 25 25 // Default constructor. … … 31 31 // @param[in] copystorage whether allocate internal memory or not. 32 32 // @see Locator::set() 33 HuntLocator( double*v, unsigned int n, bool copystorage=true);33 HuntLocator(T *v, unsigned int n, bool copystorage=true); 34 34 35 35 // Destructor. … … 41 41 // @return location as an index j. 42 42 // @see Locator::locate() 43 unsigned int locate( doublex);43 unsigned int locate(T x); 44 44 private: 45 // Hunt algorithm 46 // @param[in] x input value to be located. 47 // @param[in,out] left input: the starting point for hunt. 48 // output: the left index of hunted region. 49 // @param[out] right the right index of hunted region. 50 void hunt(T x, unsigned int &left, unsigned int &right); 51 45 52 // Storage for previous result. 46 53 unsigned int prev_; … … 48 55 49 56 } 57 58 #include "HuntLocator.tcc" 59 50 60 #endif
Note: See TracChangeset
for help on using the changeset viewer.