Interpolator::Interpolator2D Class Reference

This class provide an interface for a 2D interpolator. More...

#include <Interpolator2D.h>

Inherits Interpolator::Interpolator.

Inherited by Interpolator::BilinearInterpolator2D, and Interpolator::NearestNeighbourInterpolator2D.

Inheritance diagram for Interpolator::Interpolator2D:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Interpolator2D ()
 Default constructor.
 Interpolator2D (std::string sName, std::string sDescription, std::string sInterpolationType, InterpolationData2D *mInterpolationData)
 This constructor requires 4 parameters :
  • the name of the interpolator
  • the description of the interpolator
  • the interpolated type
  • the interpolation data object.

virtual ~Interpolator2D ()
 Destructor.
virtual double getInterpolatedValue (double dXValue, double dYValue)=0
virtual InterpolationData2DgetInterpolatedData ()
 Return the 2D interpolation data object.
void findIndexes (double dXValue, double dYValue)
 Method to find the nearest indexes of the two values dXValue, dYValue.
int findXIndex (double dXValue)
 Method to find the nearest index of the dXValue.
int findYIndex (double dYValue)
 Method to find the nearest index of the dYValue.
virtual double compute (double dXValue, double dYValue)=0

Protected Attributes

InterpolationData2D_mInterpolationData

Detailed Description

This class provide an interface for a 2D interpolator.

Definition at line 20 of file Interpolator2D.h.


Constructor & Destructor Documentation

Interpolator::Interpolator2D::Interpolator2D  ) 
 

Default constructor.

Definition at line 15 of file Interpolator2D.cpp.

00016 {
00017 
00018 }

Interpolator::Interpolator2D::Interpolator2D std::string  sName,
std::string  sDescription,
std::string  sInterpolationType,
InterpolationData2D mInterpolationData
 

This constructor requires 4 parameters :

  • the name of the interpolator
  • the description of the interpolator
  • the interpolated type
  • the interpolation data object.

Definition at line 31 of file Interpolator2D.cpp.

00034                                                                                                          : 
00035 Interpolator(sName,sDescription,sInterpolationType),_mInterpolationData(mInterpolationData)
00036 
00037 {
00038                                 
00039 }

Interpolator::Interpolator2D::~Interpolator2D  )  [virtual]
 

Destructor.

Definition at line 21 of file Interpolator2D.cpp.

00022 {
00023 
00024 }


Member Function Documentation

virtual double Interpolator::Interpolator2D::compute double  dXValue,
double  dYValue
[pure virtual]
 

Implemented in Interpolator::BilinearInterpolator2D, Interpolator::FourNearestNeighboursMeanInterpolator2D, and Interpolator::NearestNeighbourInterpolator2D.

void Interpolator::Interpolator2D::findIndexes double  dXValue,
double  dYValue
 

Method to find the nearest indexes of the two values dXValue, dYValue.

Definition at line 42 of file Interpolator2D.cpp.

References findXIndex(), and findYIndex().

00043 {
00044         //Faire algo quicksort pour plus de rapidité
00045         //int iXIndex = 
00046         findXIndex(dXValue);
00047         //int iYIndex = 
00048         findYIndex(dYValue);
00049 }

Here is the call graph for this function:

int Interpolator::Interpolator2D::findXIndex double  dXValue  ) 
 

Method to find the nearest index of the dXValue.

Definition at line 52 of file Interpolator2D.cpp.

References _mInterpolationData, and Interpolator::InterpolationData2D::getXValue().

Referenced by Interpolator::NearestNeighbourInterpolator2D::compute(), Interpolator::FourNearestNeighboursMeanInterpolator2D::compute(), Interpolator::BilinearInterpolator2D::compute(), and findIndexes().

00053 {
00054         //Faire algo quicksort pour plus de rapidité
00055         int iXIndex = -1;
00056 
00057         for (int i=0;i<_mInterpolationData->getNbXData();i++)
00058         {
00059                 if (_mInterpolationData->getXValue(i) > dXValue) return iXIndex;
00060                 else iXIndex = i;
00061         }
00062         return iXIndex+1;
00063 }

Here is the call graph for this function:

int Interpolator::Interpolator2D::findYIndex double  dYValue  ) 
 

Method to find the nearest index of the dYValue.

Definition at line 66 of file Interpolator2D.cpp.

References _mInterpolationData, and Interpolator::InterpolationData2D::getYValue().

Referenced by Interpolator::NearestNeighbourInterpolator2D::compute(), Interpolator::FourNearestNeighboursMeanInterpolator2D::compute(), Interpolator::BilinearInterpolator2D::compute(), and findIndexes().

00067 {
00068         //Faire algo quicksort pour plus de rapidité
00069         int iYIndex = -1;
00070 
00071         for (int i=0;i<_mInterpolationData->getNbYData();i++)
00072         {
00073                 if (_mInterpolationData->getYValue(i) > dYValue) return iYIndex;
00074                 else iYIndex = i;
00075         }
00076         return iYIndex+1;
00077 }

Here is the call graph for this function:

InterpolationData2D * Interpolator::Interpolator2D::getInterpolatedData  )  [virtual]
 

Return the 2D interpolation data object.

Definition at line 80 of file Interpolator2D.cpp.

References _mInterpolationData.

Referenced by Interpolator::Table2D::getNbXData(), Interpolator::Table2D::getNbYData(), Interpolator::Table2D::getNbZData(), Interpolator::Table2D::getXValues(), Interpolator::Table2D::getYValues(), Interpolator::Table2D::getZValues(), Interpolator::Table2D::setValues(), Interpolator::Table2D::setXValue(), Interpolator::Table2D::setYValue(), and Interpolator::Table2D::setZValue().

00081 {
00082         return _mInterpolationData;
00083 }

virtual double Interpolator::Interpolator2D::getInterpolatedValue double  dXValue,
double  dYValue
[pure virtual]
 

Implemented in Interpolator::BilinearInterpolator2D, Interpolator::FourNearestNeighboursMeanInterpolator2D, and Interpolator::NearestNeighbourInterpolator2D.

Referenced by Interpolator::Table2D::computeValue().


Member Data Documentation

InterpolationData2D* Interpolator::Interpolator2D::_mInterpolationData [protected]
 

Definition at line 41 of file Interpolator2D.h.

Referenced by Interpolator::NearestNeighbourInterpolator2D::compute(), Interpolator::FourNearestNeighboursMeanInterpolator2D::compute(), Interpolator::BilinearInterpolator2D::compute(), findXIndex(), findYIndex(), and getInterpolatedData().


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