#include <Table2D.h>
Inherits Interpolator::Table.
Inheritance diagram for Interpolator::Table2D:


Public Member Functions | |||||||
| virtual | ~Table2D () | ||||||
| Destructor. | |||||||
| Table2D (std::string sName, std::string sDescription, std::string sInterpolationType, std::string sFilePath) | |||||||
This constructor requires 4 parameters :
| |||||||
| Table2D (std::string sName, std::string sDescription, std::string sInterpolationType, std::string sXName, std::string sYName, std::string sZName, long lNbDataX, long lNbDataY, double *mXValues, double *mYValues, double *mZValues) | |||||||
This constructor requires 11 parameters :
| |||||||
| double | computeValue () | ||||||
| Fake method Only to provide the interface. | |||||||
| double | computeValue (double dXValue, double dYvalue) | ||||||
| Return the output value according the entry points couple (dXValue,dYvalue) given in parameter. | |||||||
| Interpolator2D * | getInterpolator () const | ||||||
| InterpolationData2D * | getInterpolationData () const | ||||||
| Return the InterpolationData2D object which contains all the data. | |||||||
| virtual void | printInfos () | ||||||
| Display info of the Table 2D Mainly used in DEBUG. | |||||||
| void | setXValue (int i, double dNewValue) | ||||||
| Method to modify the ith value of the X interpolation data structure with the dNewValue. | |||||||
| void | setYValue (int i, double dNewValue) | ||||||
| Method to modify the ith value of the Y interpolation data structure with the dNewValue. | |||||||
| void | setZValue (int i, int j, double dNewValue) | ||||||
| Method to modify the ith value of the Z interpolation data structure with the dNewValue. | |||||||
| void | setValues (long lNbXData, long lNbYData, double *dNewXValues, double *dNewYValues, double *dNewZValues) | ||||||
| Method to modify the values of the interpolation data structure with the dNewXValues, dNewYValues and dNewZValues. | |||||||
| double | getXValue (int i) const | ||||||
Return the ith value of X array
| |||||||
| double | getYValue (int i) const | ||||||
Return the ith value of Y array
| |||||||
| double | getZValue (int i, int j) const | ||||||
Return the (ith,jth) value of Z array
| |||||||
| double * | getXValues () const | ||||||
Return the X values (first column)
| |||||||
| double * | getYValues () const | ||||||
Return the Y values (second column)
| |||||||
| double * | getZValues () const | ||||||
Return the Z array
| |||||||
| long | getNbXData () const | ||||||
| Return the number of X data. | |||||||
| long | getNbYData () const | ||||||
| Return the number of Y data. | |||||||
| long | getNbZData () const | ||||||
| Return the number of Z data. | |||||||
Private Member Functions | |||||||
| void | initializeInterpolator () | ||||||
| Method to initialize the interpolator object according the wanted interpolation type. | |||||||
Private Attributes | |||||||
| Interpolator2D * | _mInterpolator | ||||||
| InterpolationData2D * | _mData | ||||||
If you use the constructor with data (double*) it is necessary to delete the objects pointed. Indeed during the creation of the table, the data are copied in an internal structure.
Definition at line 28 of file Table2D.h.
|
|
Destructor.
Definition at line 24 of file Table2D.cpp. References _mData, and _mInterpolator. 00025 { 00026 DESTRUCTION(_mInterpolator); 00027 DESTRUCTION(_mData); 00028 }
|
|
||||||||||||||||||||
|
This constructor requires 4 parameters :
Definition at line 35 of file Table2D.cpp. References _mData, Interpolator::GenericFileReader2D::getDataX(), Interpolator::GenericFileReader2D::getDataXName(), Interpolator::GenericFileReader2D::getDataY(), Interpolator::GenericFileReader2D::getDataYName(), Interpolator::GenericFileReader2D::getDataZ(), Interpolator::GenericFileReader2D::getDataZName(), Interpolator::GenericFileReader2D::getNbDataX(), Interpolator::GenericFileReader2D::getNbDataY(), and initializeInterpolator(). 00038 : 00039 Table(sName,sDescription,sInterpolationType,sFilePath) 00040 { 00041 GenericFileReader2D* _mFileReader = new GenericFileReader2D(sFilePath); 00042 00043 double* mXValues = _mFileReader->getDataX(); 00044 double* mYValues = _mFileReader->getDataY(); 00045 double* mZValues = _mFileReader->getDataZ(); 00046 00047 long lNbXValues = _mFileReader->getNbDataX(); 00048 long lNbYValues = _mFileReader->getNbDataY(); 00049 // long lNbZValues = _mFileReader->getNbDataZ(); 00050 00051 std::string _sXName = _mFileReader->getDataXName(); 00052 std::string _sYName = _mFileReader->getDataYName(); 00053 std::string _sZName = _mFileReader->getDataZName(); 00054 00055 _mData = new InterpolationData2D( _sXName,_sYName,_sZName, 00056 lNbXValues,lNbYValues, 00057 mXValues,mYValues,mZValues); 00058 00059 initializeInterpolator(); 00060 delete(_mFileReader); 00061 00062 }
Here is the call graph for this function: ![]() |
|
||||||||||||||||||||||||||||||||||||||||||||||||
|
This constructor requires 11 parameters :
Definition at line 77 of file Table2D.cpp. References _mData, and initializeInterpolator(). 00087 : 00088 Table(sName,sDescription,sInterpolationType) 00089 { 00090 00091 _mData = new InterpolationData2D( sXName,sYName,sZName, 00092 lNbDataX,lNbDataY, 00093 mXValues,mYValues,mZValues); 00094 00095 initializeInterpolator(); 00096 00097 00098 }
Here is the call graph for this function: ![]() |
|
||||||||||||
|
Return the output value according the entry points couple (dXValue,dYvalue) given in parameter.
Definition at line 131 of file Table2D.cpp. References _mInterpolator, and Interpolator::Interpolator2D::getInterpolatedValue(). 00132 { 00133 return _mInterpolator->getInterpolatedValue(dXValue,dYvalue); 00134 }
Here is the call graph for this function: ![]() |
|
|
Fake method
Implements Interpolator::Table. Definition at line 138 of file Table2D.cpp. Referenced by main().
|
|
|
Return the InterpolationData2D object which contains all the data.
Definition at line 144 of file Table2D.cpp. References _mData. Referenced by main(). 00145 { 00146 return _mData; 00147 }
|
|
|
|
|
|
Return the number of X data.
Definition at line 247 of file Table2D.cpp. References _mInterpolator, Interpolator::Interpolator2D::getInterpolatedData(), and Interpolator::InterpolationData2D::getNbXData(). 00248 { 00249 return _mInterpolator->getInterpolatedData()->getNbXData(); 00250 }
Here is the call graph for this function: ![]() |
|
|
Return the number of Y data.
Definition at line 253 of file Table2D.cpp. References _mInterpolator, Interpolator::Interpolator2D::getInterpolatedData(), and Interpolator::InterpolationData2D::getNbYData(). 00254 { 00255 return _mInterpolator->getInterpolatedData()->getNbYData(); 00256 }
Here is the call graph for this function: ![]() |
|
|
Return the number of Z data.
Definition at line 259 of file Table2D.cpp. References _mInterpolator, Interpolator::Interpolator2D::getInterpolatedData(), and Interpolator::InterpolationData2D::getNbZData(). 00260 { 00261 return _mInterpolator->getInterpolatedData()->getNbZData(); 00262 }
Here is the call graph for this function: ![]() |
|
|
Return the ith value of X array
Definition at line 203 of file Table2D.cpp. 00204 { 00205 return _mInterpolator->getInterpolatedData()->getXValue(i); 00206 }
|
|
|
Return the X values (first column)
Definition at line 226 of file Table2D.cpp. References _mInterpolator, Interpolator::Interpolator2D::getInterpolatedData(), and Interpolator::InterpolationData2D::getXValues(). 00227 { 00228 return _mInterpolator->getInterpolatedData()->getXValues(); 00229 }
Here is the call graph for this function: ![]() |
|
|
Return the ith value of Y array
Definition at line 211 of file Table2D.cpp. 00212 { 00213 return _mInterpolator->getInterpolatedData()->getYValue(i); 00214 }
|
|
|
Return the Y values (second column)
Definition at line 233 of file Table2D.cpp. References _mInterpolator, Interpolator::Interpolator2D::getInterpolatedData(), and Interpolator::InterpolationData2D::getYValues(). 00234 { 00235 return _mInterpolator->getInterpolatedData()->getYValues(); 00236 }
Here is the call graph for this function: ![]() |
|
||||||||||||
|
Return the (ith,jth) value of Z array
Definition at line 219 of file Table2D.cpp. 00220 { 00221 return _mInterpolator->getInterpolatedData()->getZValue(i,j); 00222 }
|
|
|
Return the Z array
Definition at line 240 of file Table2D.cpp. References _mInterpolator, Interpolator::Interpolator2D::getInterpolatedData(), and Interpolator::InterpolationData2D::getZValues(). 00241 { 00242 return _mInterpolator->getInterpolatedData()->getZValues(); 00243 }
Here is the call graph for this function: ![]() |
|
|
Method to initialize the interpolator object according the wanted interpolation type.
Definition at line 101 of file Table2D.cpp. References _mData, _mInterpolator, Interpolator::Table::getDescription(), and Interpolator::Table::getInterpolationType(). Referenced by Table2D(). 00102 { 00104 if (getInterpolationType() == "Bilinear") 00105 { 00106 _mInterpolator = new BilinearInterpolator2D("Bilinear Interpolator", 00107 getDescription(), 00108 _mData); 00109 } 00110 00112 else if (getInterpolationType() == "Nearest") 00113 { 00114 _mInterpolator = new NearestNeighbourInterpolator2D("Nearest Neighbour Interpolator", 00115 getDescription(), 00116 "Nearest Neighbour", 00117 _mData); 00118 } 00119 00121 else if (getInterpolationType() == "FourNearestMean") 00122 { 00123 _mInterpolator = new FourNearestNeighboursMeanInterpolator2D( "FourNearestNeighboursMean Interpolator", 00124 getDescription(), 00125 _mData); 00126 } 00127 }
Here is the call graph for this function: ![]() |
|
|
Display info of the Table 2D
Implements Interpolator::Table. Definition at line 150 of file Table2D.cpp. References Interpolator::Interpolator::_verb, Interpolator::Table::getDescription(), Interpolator::Table::getInterpolationType(), and Interpolator::Table::getName(). 00151 { 00152 if(Interpolator::_verb == true) cout << "\n##### TABLE 2D --> " << getName() << " #####" << endl; 00153 if(Interpolator::_verb == true) cout << "\tInterpolation Type:" << getInterpolationType() << endl; 00154 if(Interpolator::_verb == true) cout << "\t" << getDescription() << endl; 00155 }
Here is the call graph for this function: ![]() |
|
||||||||||||||||||||||||
|
Method to modify the values of the interpolation data structure with the dNewXValues, dNewYValues and dNewZValues.
Definition at line 192 of file Table2D.cpp. References _mInterpolator, Interpolator::Interpolator2D::getInterpolatedData(), and Interpolator::InterpolationData2D::setValues(). 00193 { 00194 //First we update the interpolation data structure values 00195 _mInterpolator->getInterpolatedData()->setValues(lNbXData,lNbYData,dNewXValues,dNewYValues,dNewZValues); 00196 }
Here is the call graph for this function: ![]() |
|
||||||||||||
|
Method to modify the ith value of the X interpolation data structure with the dNewValue.
Definition at line 171 of file Table2D.cpp. References _mInterpolator, Interpolator::Interpolator2D::getInterpolatedData(), and Interpolator::InterpolationData2D::setXValue(). 00172 { 00173 //First we update the interpolation data structure values 00174 _mInterpolator->getInterpolatedData()->setXValue(i,dNewValue); 00175 }
Here is the call graph for this function: ![]() |
|
||||||||||||
|
Method to modify the ith value of the Y interpolation data structure with the dNewValue.
Definition at line 178 of file Table2D.cpp. References _mInterpolator, Interpolator::Interpolator2D::getInterpolatedData(), and Interpolator::InterpolationData2D::setYValue(). 00179 { 00180 //First we update the interpolation data structure values 00181 _mInterpolator->getInterpolatedData()->setYValue(i,dNewValue); 00182 }
Here is the call graph for this function: ![]() |
|
||||||||||||||||
|
Method to modify the ith value of the Z interpolation data structure with the dNewValue.
Definition at line 185 of file Table2D.cpp. References _mInterpolator, Interpolator::Interpolator2D::getInterpolatedData(), and Interpolator::InterpolationData2D::setZValue(). 00186 { 00187 //First we update the interpolation data structure values 00188 _mInterpolator->getInterpolatedData()->setZValue(i,j,dNewValue); 00189 }
Here is the call graph for this function: ![]() |
|
|
Definition at line 84 of file Table2D.h. Referenced by getInterpolationData(), initializeInterpolator(), Table2D(), and ~Table2D(). |
|
|
Definition at line 83 of file Table2D.h. Referenced by computeValue(), getNbXData(), getNbYData(), getNbZData(), getXValues(), getYValues(), getZValues(), initializeInterpolator(), setValues(), setXValue(), setYValue(), setZValue(), and ~Table2D(). |
1.4.5