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-05-19 00021 ** Authors: 00022 ** Marc Wathelet 00023 ** Marc Wathelet (ULg, Liège, Belgium) 00024 ** Marc Wathelet (LGIT, Grenoble, France) 00025 ** 00026 ***************************************************************************/ 00027 00028 #ifndef MULTIMODALFREQUENCY_H 00029 #define MULTIMODALFREQUENCY_H 00030 00031 #include <math.h> 00032 #include <QGpCoreTools.h> 00033 #include "QGpCompatibilityDLLExport.h" 00034 00035 namespace QGpCompatibility { 00036 00037 class QGPCOMPATIBILITY_EXPORT CompatMultiModalFrequency 00038 { 00039 public: 00041 CompatMultiModalFrequency(); 00043 CompatMultiModalFrequency(int modesCount, int omegasCount); 00045 CompatMultiModalFrequency(const CompatMultiModalFrequency * o); 00047 CompatMultiModalFrequency(const CompatMultiModalFrequency * o,int modesCount); 00049 virtual ~CompatMultiModalFrequency(); 00050 00051 //virtual const QString& xml_tagName() const {return xmlMultiModalFrequencyTag;} 00052 //static const QString xmlMultiModalFrequencyTag; 00053 00055 bool isSameOmegas(const CompatMultiModalFrequency * o) const; 00057 void omegaToReport(QDataStream& s) const; 00059 void reportToOmega(QDataStream& s); 00061 int omegasCount () const {return _omegasCount;} 00063 int modesCount () const {return _modesCount;} 00065 QVector<double> * periods(); 00067 QVector<double> * frequencies(); 00075 void setFrequencies(QVector<double> * values); 00083 void setPeriods(QVector<double> * values); 00085 double omega(int i) const {return _omegas[i];} 00086 void setFrequency(int i, double f) {_omegas[i]=_freq2omega*f;} 00087 protected: 00088 friend class CompatMultiModalData; 00090 int _omegasCount; 00092 double * _omegas; 00096 double _freq2omega; 00098 int _modesCount; 00099 /*protected: 00100 virtual void xml_writeProperties(XML_WRITEPROPERTIES_ARGS) const; 00101 virtual bool xml_setProperty(CompatStringSection&, CompatStringSection&);*/ 00102 }; 00103 00104 } // namespace QGpCompatibility 00105 00106 #endif // COMPATMULTIMODALFREQUENCY_H