QGpCompatibility/CompatAutocorrData.h
Go to the documentation of this file.
00001 /***************************************************************************
00002 **
00003 **  This file is part of QGpCompatibility.
00004 **
00005 **  This file may be distributed and/or modified under the terms of the
00006 **  GNU General Public License version 2 or 3 as published by the Free
00007 **  Software Foundation and appearing in the file LICENSE.GPL included
00008 **  in the packaging of this file.
00009 **
00010 **  This file is distributed in the hope that it will be useful, but WITHOUT
00011 **  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 **  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
00013 **  more details.
00014 **
00015 **  You should have received a copy of the GNU General Public License
00016 **  along with this program. If not, see <http://www.gnu.org/licenses/>.
00017 **
00018 **  See http://www.geopsy.org for more information.
00019 **
00020 **  Created : 2003-02-11
00021 **  Authors:
00022 **    Marc Wathelet
00023 **    Marc Wathelet (ULg, Liège, Belgium)
00024 **    Marc Wathelet (LGIT, Grenoble, France)
00025 **
00026 ***************************************************************************/
00027 
00028 #ifndef AUTOCORRDATA_H
00029 #define AUTOCORRDATA_H
00030 
00031 #include "QGpCompatibilityDLLExport.h"
00032 #include "CompatAutocorrCurves.h"
00033 
00034 namespace QGpCompatibility {
00035 
00036 class QGPCOMPATIBILITY_EXPORT CompatAutocorrData :  public CompatAutocorrCurves
00037 {
00038 public:
00040   CompatAutocorrData();
00042   CompatAutocorrData(int modesCount, int radiusCount, int omegasCount);
00044   CompatAutocorrData(const CompatAutocorrData * curve, int modesCount);
00046   CompatAutocorrData(const CompatAutocorrCurves * curve);
00048   virtual ~CompatAutocorrData();
00049   
00050   // I/O functions
00051   // -------------
00053   void dataToReport(QDataStream& s);
00055   void reportToData(QDataStream& s);
00057   void reportToDataWeight(QDataStream& s, bool loadIt);
00058   
00060   void setMean(int i, int r, int m, double mean) {_measurements[m][r][i]=mean;}
00062   double measurement(int i, int r, int m) {return _measurements[m][r][i];}
00064   void setStddev(int i, int r, int m, double stddev) {_stddev[m][r][i]=stddev;}
00066   double stddev(int i, int r, int m) {return _stddev[m][r][i];}
00068   void setWeight(int i, int r, int m, double w) {_weight[m][r][i]=w;}
00070   double weight(int i, int r, int m) {return _weight[m][r][i];}
00072   QVector<double> * measurements(int iMode,int iRadius);
00074   QVector<double> * distanceMeasurements(int iMode,int iOmega);
00076   QVector<double> * stddev(int iMode,int iRadius);
00078   QVector<double> * distanceStddev(int iMode,int iOmega);
00080   QVector<double> * weight(int iMode,int iRadius);
00081   
00083   bool isSameData(const CompatAutocorrData * other) const;
00085   QString & log() {return _log;}
00087   void addLog(QString& s) {_log+=s+"\n";}
00089   void valuesToData(const CompatAutocorrCurves * o);
00091   void valuesToData() {valuesToData(this);}
00092   
00093 protected:
00095   double *** _measurements;  
00097   double *** _stddev;
00099   double *** _weight;
00101   QString _log;
00102   
00104   void allocatesData();
00106   void deleteData();
00107 };
00108 
00109 } // namespace QGpCompatibility
00110 
00111 #endif // COMPATAUTOCORRDATA_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines