Ignore:
Timestamp:
01/16/13 16:45:43 (11 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: Yes CAS-4770

Ready for Test: Yes

Interface Changes: Yes/No?

What Interface Changed: Please list interface changes

Test Programs: List test programs

Put in Release Notes: Yes/No?

Module(s): Module Names change impacts.

Description: Describe your changes here...

Redefined Locator and its derived classes as template class.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/HuntLocator.h

    r2730 r2731  
    2121 * @author TakeshiNakazato
    2222 */
    23 class HuntLocator : public Locator {
     23template <class T> class HuntLocator : public Locator<T> {
    2424public:
    2525  // Default constructor.
     
    3131  // @param[in] copystorage whether allocate internal memory or not.
    3232  // @see Locator::set()
    33   HuntLocator(double *v, unsigned int n, bool copystorage=true);
     33  HuntLocator(T *v, unsigned int n, bool copystorage=true);
    3434
    3535  // Destructor.
     
    4141  // @return location as an index j.
    4242  // @see Locator::locate()
    43   unsigned int locate(double x);
     43  unsigned int locate(T x);
    4444private:
     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
    4552  // Storage for previous result.
    4653  unsigned int prev_;
     
    4855
    4956}
     57
     58#include "HuntLocator.tcc"
     59
    5060#endif
Note: See TracChangeset for help on using the changeset viewer.