#include <InterpolationData2D.h>
Public Member Functions | |||||||
| InterpolationData2D () | |||||||
| Default constructor. | |||||||
| InterpolationData2D (std::string sXName, std::string sYName, std::string sZName, long lNbXData, long lNbYData, double *mXValues, double *mYValues, double *mZValues) | |||||||
This constructor requires 8 parameters :
| |||||||
| virtual | ~InterpolationData2D () | ||||||
| Destructor. | |||||||
| std::string | getXName () const | ||||||
| Return the X name (first column). | |||||||
| std::string | getYName () const | ||||||
| Return the Y name (first line). | |||||||
| std::string | getZName () const | ||||||
| Return the Z name (matrix). | |||||||
| 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 array
| |||||||
| double * | getYValues () const | ||||||
Return the Y array
| |||||||
| double * | getZValues () const | ||||||
Return the Z array
| |||||||
| void | setXValue (int i, double dNewValue) | ||||||
Set the ith value of X array
| |||||||
| void | setYValue (int i, double dNewValue) | ||||||
Set the ith value of Y array
| |||||||
| void | setZValue (int i, int j, double dNewValue) | ||||||
Set the (ith,jth) value of Z array
| |||||||
| void | setValues (long lNbXData, long lNbYData, double *dNewXValues, double *dNewYValues, double *dNewZValues) | ||||||
| This method allows to change the values of the X,Y and Z arrays If the matrix size is changed, memory is desallocated and new arrays are reallocated to match the new sizes. | |||||||
| 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. | |||||||
| virtual void | printInfos () | ||||||
| Display the interpolation 2D data Used mainly for DEBUG. | |||||||
Private Member Functions | |||||||
| void | setXValues (double *dNewValues) | ||||||
| This method allows to change the values of the X column It is required that the array size is not changed. | |||||||
| void | setYValues (double *dNewValues) | ||||||
| This method allows to change the values of the Y line It is required that the array size is not changed. | |||||||
| void | setZValues (double *dNewValues) | ||||||
| This method allows to change the values of the Z matrix It is required that the array size is not changed. | |||||||
Private Attributes | |||||||
| std::string | _sXName | ||||||
| std::string | _sYName | ||||||
| std::string | _sZName | ||||||
| long | _lNbXData | ||||||
| long | _lNbYData | ||||||
| long | _lNbZData | ||||||
| double * | _mXValues | ||||||
| double * | _mYValues | ||||||
| double * | _mZValues | ||||||
Definition at line 22 of file InterpolationData2D.h.
|
|
Default constructor.
Definition at line 16 of file InterpolationData2D.cpp.
|
|
||||||||||||||||||||||||||||||||||||
|
This constructor requires 8 parameters :
Definition at line 41 of file InterpolationData2D.cpp. References _lNbXData, _lNbYData, _lNbZData, _mXValues, _mYValues, _mZValues, and setValues(). 00043 : 00044 _sXName(sXName),_sYName(sYName),_sZName(sZName), 00045 _lNbXData(lNbXData),_lNbYData(lNbYData),_lNbZData(lNbXData*lNbYData) 00046 { 00047 00048 _mXValues = new double[_lNbXData]; 00049 _mYValues = new double[_lNbYData]; 00050 _mZValues = new double[_lNbZData]; 00051 00052 setValues(_lNbXData,_lNbYData,mXValues,mYValues,mZValues); 00053 }
Here is the call graph for this function: ![]() |
|
|
Destructor.
Definition at line 22 of file InterpolationData2D.cpp. References _mXValues, _mYValues, and _mZValues. 00023 { 00024 delete [] _mXValues; 00025 delete [] _mYValues; 00026 delete [] _mZValues; 00027 _mXValues = 0; 00028 _mYValues = 0; 00029 _mZValues = 0; 00030 }
|
|
|
Return the number of X data.
Definition at line 107 of file InterpolationData2D.cpp. References _lNbXData. Referenced by Interpolator::NearestNeighbourInterpolator2D::compute(), Interpolator::FourNearestNeighboursMeanInterpolator2D::compute(), Interpolator::BilinearInterpolator2D::compute(), Interpolator::Table2D::getNbXData(), printInfos(), setValues(), setXValue(), and setZValue(). 00108 { 00109 return _lNbXData; 00110 }
|
|
|
Return the number of Y data.
Definition at line 113 of file InterpolationData2D.cpp. References _lNbYData. Referenced by Interpolator::NearestNeighbourInterpolator2D::compute(), Interpolator::FourNearestNeighboursMeanInterpolator2D::compute(), Interpolator::BilinearInterpolator2D::compute(), Interpolator::Table2D::getNbYData(), printInfos(), setValues(), setYValue(), and setZValue(). 00114 { 00115 return _lNbYData; 00116 }
|
|
|
Return the number of Z data.
Definition at line 119 of file InterpolationData2D.cpp. References _lNbZData. Referenced by Interpolator::Table2D::getNbZData(). 00120 { 00121 return _lNbZData; 00122 }
|
|
|
Return the X name (first column).
Definition at line 56 of file InterpolationData2D.cpp. References _sXName. Referenced by printInfos(). 00057 { 00058 return _sXName; 00059 }
|
|
|
Return the ith value of X array
Definition at line 77 of file InterpolationData2D.cpp. Referenced by Interpolator::Interpolator2D::findXIndex(), and printInfos(). 00078 { 00079 if ((i < 0) || (i >= getNbXData())) throw IndexOutOfBoundException("index",i,0,getNbXData(),"InterpolationData2D::getXValue(int i)",__FILE__,__LINE__); 00080 if (_mXValues == 0) throw NullPointerException("_mXValues","InterpolationData2D::getXValue(int i)",__FILE__,__LINE__); 00081 return _mXValues[i]; 00082 }
|
|
|
Return the X array
Definition at line 162 of file InterpolationData2D.cpp. References _mXValues. Referenced by Interpolator::Table2D::getXValues(). 00163 { 00164 if (_mXValues == 0) throw NullPointerException("_mXValues","InterpolationData2D::getXValues()",__FILE__,__LINE__); 00165 return _mXValues; 00166 }
|
|
|
Return the Y name (first line).
Definition at line 62 of file InterpolationData2D.cpp. References _sYName. Referenced by printInfos(). 00063 { 00064 return _sYName; 00065 }
|
|
|
Return the ith value of Y array
Definition at line 87 of file InterpolationData2D.cpp. Referenced by Interpolator::Interpolator2D::findYIndex(), and printInfos(). 00088 { 00089 if ((i < 0) || (i >= getNbYData())) throw IndexOutOfBoundException("index",i,0,getNbYData(),"InterpolationData2D::getYValue(int i)",__FILE__,__LINE__); 00090 if (_mYValues == 0) throw NullPointerException("_mYValues","InterpolationData2D::getYValue(int i)",__FILE__,__LINE__); 00091 return _mYValues[i]; 00092 }
|
|
|
Return the Y array
Definition at line 170 of file InterpolationData2D.cpp. References _mYValues. Referenced by Interpolator::Table2D::getYValues(). 00171 { 00172 if (_mYValues == 0) throw NullPointerException("_mYValues","InterpolationData2D::getYValues()",__FILE__,__LINE__); 00173 return _mYValues; 00174 }
|
|
|
Return the Z name (matrix).
Definition at line 68 of file InterpolationData2D.cpp. References _sZName. Referenced by printInfos(). 00069 { 00070 return _sZName; 00071 }
|
|
||||||||||||
|
Return the (ith,jth) value of Z array
Definition at line 97 of file InterpolationData2D.cpp. Referenced by Interpolator::NearestNeighbourInterpolator2D::compute(), Interpolator::FourNearestNeighboursMeanInterpolator2D::compute(), Interpolator::BilinearInterpolator2D::compute(), and printInfos(). 00098 { 00099 if ((i < 0) || (i >= getNbXData())) throw IndexOutOfBoundException("index",i,0,getNbXData(),"InterpolationData2D::getZValue(int i,int j)",__FILE__,__LINE__); 00100 if ((j < 0) || (j >= getNbYData())) throw IndexOutOfBoundException("index",j,0,getNbYData(),"InterpolationData2D::getZValue(int i,int j)",__FILE__,__LINE__); 00101 if (_mZValues == 0) throw NullPointerException("_mZValues","InterpolationData2D::getZValue(int i,int j)",__FILE__,__LINE__); 00102 return _mZValues[i*_lNbYData + j]; 00103 }
|
|
|
Return the Z array
Definition at line 178 of file InterpolationData2D.cpp. References _mZValues. Referenced by Interpolator::Table2D::getZValues(). 00179 { 00180 if (_mZValues == 0) throw NullPointerException("_mZValues","InterpolationData2D::getZValues()",__FILE__,__LINE__); 00181 return _mZValues; 00182 }
|
|
|
Display the interpolation 2D data
Definition at line 248 of file InterpolationData2D.cpp. References Interpolator::Interpolator::_verb, getNbXData(), getNbYData(), getXName(), getXValue(), getYName(), getYValue(), getZName(), and getZValue(). 00249 { 00250 int i,j; 00251 00252 if(Interpolator::_verb == true) cout << "\n##### INTERPOLATION DATA 2D #####" << endl; 00253 if(Interpolator::_verb == true) cout << "X Name=" << getXName() << " | Y Name=" << getYName() << " | Z Name=" << getZName() << endl; 00254 if(Interpolator::_verb == true) cout << "\t"; 00255 00256 for (i=0;i < getNbYData();i++) 00257 { 00258 if(Interpolator::_verb == true) cout << getYValue(i) << "\t"; 00259 } 00260 if(Interpolator::_verb == true) cout << endl; 00261 00262 for (i=0;i< getNbXData();i++) 00263 { 00264 for (j=-1;j < getNbYData();j++) 00265 { 00266 if (j==-1) if(Interpolator::_verb == true) cout << getXValue(i) << "\t"; 00267 else if(Interpolator::_verb == true) cout << getZValue(i,j) << "\t"; 00268 } 00269 if(Interpolator::_verb == true) cout << endl; 00270 } 00271 00272 }
Here is the call graph for this function: ![]() |
|
||||||||||||||||||||||||
|
This method allows to change the values of the X,Y and Z arrays
Definition at line 222 of file InterpolationData2D.cpp. References _lNbXData, _lNbYData, _lNbZData, _mXValues, _mYValues, _mZValues, getNbXData(), getNbYData(), setXValues(), setYValues(), and setZValues(). Referenced by InterpolationData2D(), and Interpolator::Table2D::setValues(). 00223 { 00224 00225 if (lNbXData != getNbXData() || lNbYData != getNbYData()) //It is necessary to reallocate the X and Z array 00226 { 00227 delete [] _mXValues; 00228 delete [] _mYValues; 00229 delete [] _mZValues; 00230 00231 _lNbXData = lNbXData; 00232 _lNbYData = lNbYData; 00233 _lNbZData = lNbXData * lNbYData; 00234 00235 _mXValues = new double[_lNbXData]; 00236 _mYValues = new double[_lNbYData]; 00237 _mZValues = new double[_lNbZData]; 00238 } 00239 00240 setXValues(dNewXValues); 00241 setYValues(dNewYValues); 00242 setZValues(dNewZValues); 00243 }
Here is the call graph for this function: ![]() |
|
||||||||||||
|
Set the ith value of X array
Definition at line 131 of file InterpolationData2D.cpp. References _mXValues, and getNbXData(). Referenced by Interpolator::Table2D::setXValue(), and setXValues(). 00132 { 00133 if ((i < 0) || (i >= getNbXData())) throw IndexOutOfBoundException("index",i,0,getNbXData(),"InterpolationData2D::setXValue(int i,double dNewValue)",__FILE__,__LINE__); 00134 if (_mXValues == 0) throw NullPointerException("_mXValues","InterpolationData2D::setXValue(int i,double dNewValue)",__FILE__,__LINE__); 00135 _mXValues[i] = dNewValue; 00136 }
Here is the call graph for this function: ![]() |
|
|
This method allows to change the values of the X column It is required that the array size is not changed.
Definition at line 187 of file InterpolationData2D.cpp. References _lNbXData, and setXValue(). Referenced by setValues(). 00188 { 00189 for (int i=0;i<_lNbXData;i++) 00190 { 00191 setXValue(i,*(dNewValues+i)); 00192 } 00193 }
Here is the call graph for this function: ![]() |
|
||||||||||||
|
Set the ith value of Y array
Definition at line 141 of file InterpolationData2D.cpp. References _mYValues, and getNbYData(). Referenced by Interpolator::Table2D::setYValue(), and setYValues(). 00142 { 00143 if ((i < 0) || (i >= getNbYData())) throw IndexOutOfBoundException("index",i,0,getNbYData(),"InterpolationData2D::setYValue(int i,double dNewValue)",__FILE__,__LINE__); 00144 if (_mYValues == 0) throw NullPointerException("_mYValues","InterpolationData2D::setYValue(int i,double dNewValue)",__FILE__,__LINE__); 00145 _mYValues[i] = dNewValue; 00146 }
Here is the call graph for this function: ![]() |
|
|
This method allows to change the values of the Y line It is required that the array size is not changed.
Definition at line 197 of file InterpolationData2D.cpp. References _lNbYData, and setYValue(). Referenced by setValues(). 00198 { 00199 for (int i=0;i<_lNbYData;i++) 00200 { 00201 setYValue(i,*(dNewValues+i)); 00202 } 00203 }
Here is the call graph for this function: ![]() |
|
||||||||||||||||
|
Set the (ith,jth) value of Z array
Definition at line 152 of file InterpolationData2D.cpp. References _lNbYData, _mZValues, getNbXData(), and getNbYData(). Referenced by Interpolator::Table2D::setZValue(), and setZValues(). 00153 { 00154 if ((i < 0) || (i >= getNbXData())) throw IndexOutOfBoundException("index",i,0,getNbXData(),"InterpolationData2D::setZValue(int i,int j,double dNewValue)",__FILE__,__LINE__); 00155 if ((j < 0) || (j >= getNbYData())) throw IndexOutOfBoundException("index",j,0,getNbYData(),"InterpolationData2D::setZValue(int i,int j,double dNewValue)",__FILE__,__LINE__); 00156 if (_mZValues == 0) throw NullPointerException("_mZValues","InterpolationData2D::setZValue(int i,int j,double dNewValue)",__FILE__,__LINE__); 00157 _mZValues[i*_lNbYData + j] = dNewValue; 00158 }
Here is the call graph for this function: ![]() |
|
|
This method allows to change the values of the Z matrix It is required that the array size is not changed.
Definition at line 208 of file InterpolationData2D.cpp. References _lNbXData, _lNbYData, and setZValue(). Referenced by setValues(). 00209 { 00210 for (int i=0;i<_lNbXData;i++) 00211 { 00212 for (int j=0;j<_lNbYData;j++) 00213 { 00214 setZValue(i,j,*(dNewValues+(i*_lNbYData + j))); 00215 } 00216 } 00217 }
Here is the call graph for this function: ![]() |
|
|
Definition at line 63 of file InterpolationData2D.h. Referenced by getNbXData(), InterpolationData2D(), setValues(), setXValues(), and setZValues(). |
|
|
Definition at line 64 of file InterpolationData2D.h. Referenced by getNbYData(), InterpolationData2D(), setValues(), setYValues(), setZValue(), and setZValues(). |
|
|
Definition at line 65 of file InterpolationData2D.h. Referenced by getNbZData(), InterpolationData2D(), and setValues(). |
|
|
Definition at line 67 of file InterpolationData2D.h. Referenced by getXValues(), InterpolationData2D(), setValues(), setXValue(), and ~InterpolationData2D(). |
|
|
Definition at line 68 of file InterpolationData2D.h. Referenced by getYValues(), InterpolationData2D(), setValues(), setYValue(), and ~InterpolationData2D(). |
|
|
Definition at line 69 of file InterpolationData2D.h. Referenced by getZValues(), InterpolationData2D(), setValues(), setZValue(), and ~InterpolationData2D(). |
|
|
Definition at line 59 of file InterpolationData2D.h. Referenced by getXName(). |
|
|
Definition at line 60 of file InterpolationData2D.h. Referenced by getYName(). |
|
|
Definition at line 61 of file InterpolationData2D.h. Referenced by getZName(). |
1.4.5