Interpolator::PeriodicCubicSplineInterpolator1D Class Reference

This class performs a periodic cubic spline interpolation. More...

#include <PeriodicCubicSplineInterpolator1D.h>

Inherits Interpolator::Interpolator1D.

Inheritance diagram for Interpolator::PeriodicCubicSplineInterpolator1D:

Inheritance graph
[legend]
Collaboration diagram for Interpolator::PeriodicCubicSplineInterpolator1D:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PeriodicCubicSplineInterpolator1D ()
 Default constructor.
virtual ~PeriodicCubicSplineInterpolator1D ()
 Destructor.
 PeriodicCubicSplineInterpolator1D (std::string sName, std::string sDescription, InterpolationData1D *mInterpolationData)
 This constructor requires 3 parameters :
  • the name of the interpolator
  • the description of the interpolator
  • the interpolated data.

virtual double getInterpolatedValue (double dValue)
 Return the interpolated value for the wanted dValue.
virtual void updateInterpolator ()
 Method to update the interpolator according the new InterpolationData values.

Detailed Description

This class performs a periodic cubic spline interpolation.

Definition at line 19 of file PeriodicCubicSplineInterpolator1D.h.


Constructor & Destructor Documentation

Interpolator::PeriodicCubicSplineInterpolator1D::PeriodicCubicSplineInterpolator1D  ) 
 

Default constructor.

Definition at line 16 of file PeriodicCubicSplineInterpolator1D.cpp.

00017 {
00018 
00019 }

Interpolator::PeriodicCubicSplineInterpolator1D::~PeriodicCubicSplineInterpolator1D  )  [virtual]
 

Destructor.

Definition at line 22 of file PeriodicCubicSplineInterpolator1D.cpp.

References Interpolator::Interpolator1D::acc, and Interpolator::Interpolator1D::spline.

00023 {
00024     gsl_spline_free (spline);
00025     gsl_interp_accel_free (acc);
00026 }

Interpolator::PeriodicCubicSplineInterpolator1D::PeriodicCubicSplineInterpolator1D std::string  sName,
std::string  sDescription,
InterpolationData1D mInterpolationData
 

This constructor requires 3 parameters :

  • the name of the interpolator
  • the description of the interpolator
  • the interpolated data.

Definition at line 32 of file PeriodicCubicSplineInterpolator1D.cpp.

References Interpolator::Interpolator1D::acc, Interpolator::Interpolator1D::getNbData(), Interpolator::InterpolationData1D::getXValues(), Interpolator::InterpolationData1D::getYValues(), and Interpolator::Interpolator1D::spline.

00035                                                                          : 
00036                                 Interpolator1D(sName,sDescription,"Periodic Cubic Spline",
00037                                 mInterpolationData)
00038 
00039 {
00040         acc             = gsl_interp_accel_alloc ();
00041         spline  = gsl_spline_alloc (gsl_interp_cspline_periodic, getNbData());
00042         gsl_spline_init (spline, mInterpolationData->getXValues(), mInterpolationData->getYValues(), getNbData());
00043 }

Here is the call graph for this function:


Member Function Documentation

double Interpolator::PeriodicCubicSplineInterpolator1D::getInterpolatedValue double  dValue  )  [virtual]
 

Return the interpolated value for the wanted dValue.

Implements Interpolator::Interpolator1D.

Definition at line 46 of file PeriodicCubicSplineInterpolator1D.cpp.

References Interpolator::Interpolator1D::acc, and Interpolator::Interpolator1D::spline.

00047 {
00048       return gsl_spline_eval (spline, dValue, acc);
00049 }

void Interpolator::PeriodicCubicSplineInterpolator1D::updateInterpolator  )  [virtual]
 

Method to update the interpolator according the new InterpolationData values.

Implements Interpolator::Interpolator1D.

Definition at line 53 of file PeriodicCubicSplineInterpolator1D.cpp.

References Interpolator::Interpolator1D::acc, Interpolator::Interpolator1D::getInterpolatedData(), Interpolator::Interpolator1D::getNbData(), and Interpolator::Interpolator1D::spline.

00054 {
00055         gsl_spline_free (spline);
00056     gsl_interp_accel_free (acc);
00057         acc             = gsl_interp_accel_alloc ();
00058         spline  = gsl_spline_alloc (gsl_interp_cspline_periodic, getNbData());
00059         gsl_spline_init (spline, getInterpolatedData()->getXValues(), getInterpolatedData()->getYValues(), getNbData());
00060 }

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Tue Apr 14 09:51:41 2009 for Interpolator Library by  doxygen 1.4.5