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

New Development: No

JIRA Issue: Yes CAS-4770

Ready for Test: Yes

Interface Changes: 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...

Rewrite implementations for locator and interpolator.
Documentation (doxygen format) is added to header files.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/BufferedLinearInterpolator1D.h

    r2727 r2730  
    1818
    1919/**
    20  * Linear interpolation with some buffers
     20 * Linear interpolation with some buffers for acceleration.
    2121 * @author TakeshiNakazato
    2222 */
    2323class BufferedLinearInterpolator1D : public Interpolator1D {
    2424public:
     25  // Default constructor.
    2526  BufferedLinearInterpolator1D();
    2627
     28  // Destructor.
    2729  virtual ~BufferedLinearInterpolator1D();
    2830
     31  // Set horizontal (x) and vertical (y) data.
     32  // @param[in] x pointer to horizontal data.
     33  // @param[in] y pointer to vertical data.
     34  // @param[in] n number of data.
     35  // @see Interpolator1D::setData()
     36  void setData(double *x, float *y, unsigned int n);
     37
     38  // Set horizontal data (x).
     39  // @param[in] x pointer to horizontal data.
     40  // @param[in] n number of data.
     41  // @see Interpolator1D::setX()
    2942  void setX(double *x, unsigned int n);
     43
     44  // Perform interpolation.
     45  // @param[in] x horizontal location where the value is evaluated
     46  //              by interpolation.
     47  // @return interpolated value at x.
     48  // @see Interpolator1D::interpolate()
    3049  float interpolate(double x);
    3150
    3251private:
     52  // Numerical factor for linear interpolation.
    3353  double factor_;
     54
     55  // Previous location.
    3456  double xold_;
     57
     58  // Previous location as an index
    3559  unsigned int prev_;
     60
     61  // Boolean parameter whether buffered values are effective or not.
    3662  bool reusable_;
    3763};
Note: See TracChangeset for help on using the changeset viewer.