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/CubicSplineInterpolator1D.h

    r2727 r2730  
    1818
    1919/**
    20  * Cubic spline interpolation
     20 * Implementation of (natural) cubic spline interpolation.
    2121 * @author TakeshiNakazato
    2222 */
    2323class CubicSplineInterpolator1D : public Interpolator1D {
    2424public:
     25  // Default constructor.
    2526  CubicSplineInterpolator1D();
    2627
     28  // Destructor.
    2729  virtual ~CubicSplineInterpolator1D();
    2830
     31  // Override Interpolator1D::setData.
     32  // @see Interpolator1D::setData
     33  void setData(double *x, float *y, unsigned int n);
     34
     35  // Override Interpolator1D::setY.
     36  // @see Interpolator1D::setY()
    2937  void setY(float *y, unsigned int n);
     38
     39  // Perform interpolation.
     40  // @param[in] x horizontal location where the value is evaluated
     41  //              by interpolation.
     42  // @return interpolated value at x.
    3043  float interpolate(double x);
    3144private:
    32   // determine second derivatives of each point based on
    33   // natural cubic spline condition
    34   void spline();
     45  // Determine second derivatives of each point based on
     46  // natural cubic spline condition (second derivative at each
     47  // end is zero).
     48  void evaly2();
    3549
    36   // do interpolation using second derivatives from spline()
    37   float splint(double x, unsigned int i);
     50  // Do interpolation using second derivatives determined by evaly2().
     51  // @param[in] x horizontal location where the value is evaluated
     52  //              by interpolation.
     53  // @param[in] i location index for x.
     54  // @return interpolated value at x.
     55  float dospline(double x, unsigned int i);
    3856 
     57  // Array to store second derivatives on the data points.
    3958  float *y2_;
     59
     60  // number of data points for second derivatives
    4061  unsigned int ny2_;
     62
     63  // Boolean parameter whether buffered values are effective or not.
    4164  bool reusable_;
    4265};
Note: See TracChangeset for help on using the changeset viewer.