QGpCompatibility/CompatModalRefinedCurves.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 : 2004-10-22
00021 **  Authors:
00022 **    Marc Wathelet
00023 **    Marc Wathelet (ULg, Liège, Belgium)
00024 **    Marc Wathelet (LGIT, Grenoble, France)
00025 **
00026 ***************************************************************************/
00027 
00028 #ifndef COMPATMODALREFINEDCURVES_H
00029 #define COMPATMODALREFINEDCURVES_H
00030 
00031 #include "CompatModalCurves.h"
00032 #include "CompatModalRefine.h"
00033 #include "CompatModalFrequency.h"
00034 #include "QGpCompatibilityDLLExport.h"
00035 
00036 namespace QGpCompatibility {
00037 
00038 typedef QList<CompatModalRefine> CompatRefineList;
00039 typedef QList<CompatModalRefine>::iterator CompatRefineIterator;
00040 typedef QList<CompatModalRefine>::const_iterator CompatRefineConstIterator;
00041 
00042 class QGPCOMPATIBILITY_EXPORT CompatModalRefinedCurves : public CompatModalFrequency
00043 {
00044 public:
00045   void operator=(CompatModalRefinedCurves& o);
00046 
00047   void setNOmegas(int nf);
00048   virtual void setNModes(int nm) {_curves.setNModes(nm);}
00049   int nModes() const {return _curves.nModes();}
00050 
00051   // Access to curves
00052   CompatVDataPointVector& mode(int im) {return _curves.mode(im);}
00053   const CompatVDataPointVector& mode(int im) const {return _curves.mode(im);}
00054 
00055   // Output
00056   QVector<double> * meanVector(int im) {return _curves.meanVector(im);}
00057   QVector<double> * stddevVector(int im) {return _curves.stddevVector(im);}
00058   QVector<double> * weightVector(int im) {return _curves.weightVector(im);}
00059   int toPointVector(int imode, Point2D *& pointList);
00060   QVector<Point> * toPointVector(int imode);
00061   void toStream(FILE *f);
00062 
00063   virtual void addRayleighModes(int nNewModes);
00064   void addInvalidSamples(CompatModalFrequency * samples);
00065 
00066   void clearRefines() {_refines.clear();}
00067   int nRefines() const {return _refines.size();}
00068   void refineSort() {qSort(_refines);}
00069 
00070   void writeReport(QDataStream& s) const;
00071 protected:
00072   CompatModalCurves _curves;
00073   CompatRefineList _refines;
00074 protected:
00075   virtual void insertInvalidAt(int i) {_curves.insertInvalidAt(i);}
00076   virtual void addInvalid() {_curves.addInvalid();}
00077   virtual const QString& xml_tagName() const {return xmlModalRefinedCurvesTag;}
00078   static const QString xmlModalRefinedCurvesTag;
00079   virtual void xml_writeChildren(XML_WRITECHILDREN_ARGS) const;
00080   virtual XMLMember xml_member(XML_MEMBER_ARGS);
00081 };
00082 
00083 inline void CompatModalRefinedCurves::setNOmegas(int nf)
00084 {
00085   TRACE;
00086   CompatModalFrequency::setNOmegas(nf);
00087   _curves.setNOmegas(nf);
00088 }
00089 
00090 } // namespace QGpCompatibility
00091 
00092 #endif // COMPATMODALREFINEDCURVES_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines