Interpolator::AkimaInterpolator1D Class Reference

This class performs an Akima interpolation. More...

#include <AkimaInterpolator1D.h>

Inherits Interpolator::Interpolator1D.

Inheritance diagram for Interpolator::AkimaInterpolator1D:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 AkimaInterpolator1D ()
 Default constructor.
virtual ~AkimaInterpolator1D ()
 Destructor.
 AkimaInterpolator1D (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 an Akima interpolation.

Definition at line 23 of file AkimaInterpolator1D.h.


Constructor & Destructor Documentation

Interpolator::AkimaInterpolator1D::AkimaInterpolator1D  ) 
 

Default constructor.

Definition at line 17 of file AkimaInterpolator1D.cpp.

00018 {
00019 
00020 }

Interpolator::AkimaInterpolator1D::~AkimaInterpolator1D  )  [virtual]
 

Destructor.

Definition at line 23 of file AkimaInterpolator1D.cpp.

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

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

Interpolator::AkimaInterpolator1D::AkimaInterpolator1D 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 34 of file AkimaInterpolator1D.cpp.

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

00037                                                                          : 
00038                                 Interpolator1D(sName,sDescription,"Akima",
00039                                 mInterpolationData)
00040 
00041 {
00042         acc             = gsl_interp_accel_alloc ();
00043         spline  = gsl_spline_alloc (gsl_interp_akima, getNbData());
00044         gsl_spline_init (spline, mInterpolationData->getXValues(), mInterpolationData->getYValues(), getNbData());
00045 }

Here is the call graph for this function:


Member Function Documentation

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

Return the interpolated value for the wanted dValue.

Implements Interpolator::Interpolator1D.

Definition at line 48 of file AkimaInterpolator1D.cpp.

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

00049 {
00050       return gsl_spline_eval (spline, dValue, acc);
00051 }

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

Method to update the interpolator according the new InterpolationData values.

Implements Interpolator::Interpolator1D.

Definition at line 54 of file AkimaInterpolator1D.cpp.

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

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

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:05 2009 for Interpolator Library by  doxygen 1.4.5