|
Code_TYMPAN
4.4.0
Industrial site acoustic simulation
|
#include <TYSpectre.h>


Public Member Functions | |
| TYSpectre (const double &defaultValue=TY_SPECTRE_DEFAULT_VALUE) | |
| TYSpectre (const OSpectre &spectre) | |
| TYSpectre (OSpectreAbstract &spectreAbstract) | |
| TYSpectre (const OSpectreComplex &spectre) | |
| Constructeur a partir d'un OSpectreComplex. More... | |
| TYSpectre (const TYSpectre &other) | |
| virtual | ~TYSpectre () |
| virtual TYSpectre & | operator= (const TYSpectre &other) |
| Operateur d'affectation. More... | |
| virtual TYSpectre & | operator= (const OSpectre &other) |
| Operateur d'affectation depuis un OSpectre. More... | |
| virtual TYSpectre & | operator= (const OSpectreAbstract &other) |
| Operateur d'affectation depuis un OSpectreAbstract. More... | |
| virtual bool | operator== (const TYSpectre &other) const |
| Operateur d'egalite. More... | |
| virtual bool | operator!= (const TYSpectre &otehr) const |
| Operateur d'inegalite. More... | |
| virtual bool | deepCopy (const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false) |
| virtual std::string | toString () const |
| virtual DOM_Element | toXML (DOM_Element &domElement) |
| virtual int | fromXML (DOM_Element domElement) |
| virtual bool | toXML (const std::string &sFilePath) |
| virtual bool | fromXML (const std::string &sFilePath) |
| virtual std::string | toXMLString () |
| virtual bool | fromXMLString (const std::string &sXMLString) |
| virtual TYSpectreForm | getForm () |
| Set/Get de la forme du spectre. More... | |
| virtual void | setForm (const TYSpectreForm &form) |
| virtual QString | getRemarque () const |
| Set/Get des remarques. More... | |
| virtual void | setRemarque (QString rq) |
| Set/Get des remarques. More... | |
| virtual bool | getIsReadOnly () |
| Set/Get du flag de conservation en BDD. More... | |
| virtual void | setIsReadOnly (bool flag) |
| Set/Get du flag _isReadOnly. More... | |
| virtual void | exportCSV (const std::string &filename) |
| Export du spectre au format csv en creant le fichier. More... | |
| virtual void | exportCSV (std::ofstream &ofs) |
| Export du spectre au format csv sur un flux transmis. More... | |
| OSpectre * | downcast_ospectre () |
| : return spectrum casted as OSpectre More... | |
Public Member Functions inherited from TYElement | |
| TYElement () | |
| TYElement (TYElement *pParent, bool PutInInstanceList=true) | |
| TYElement (const TYElement &other, bool PutInInstanceList=true) | |
| virtual | ~TYElement () |
| void | setID (TYUUID id) |
| void | setID (const QString &str_id) |
| const TYUUID & | getID () const |
| QString | getStringID () const |
| bool | hasNullID () const |
| void | regenerateID () |
| void | setName (QString name) |
| void | setName (std::string name) |
| virtual QString | getName () const |
| void | setParent (TYElement *pParent) |
| TYElement * | getParent () const |
| virtual void | setIsAcousticModified (bool isModified) |
| bool | getIsAcousticModified () |
| virtual void | setIsGeometryModified (bool isModified) |
| bool | getIsGeometryModified () |
| TYElement & | operator= (const TYElement &other) |
| bool | operator== (const TYElement &other) const |
| bool | operator!= (const TYElement &other) const |
| bool | callFromXMLIfEqual (DOM_Element &domElement, int *pRetVal=NULL) |
| std::string | getMetierName () |
| void * | getAllUses () |
| void | setAllUses (void *allUses) |
| void | cleanAllUses () |
| virtual void | updateCurrentCalcul (TYListID &listID, bool recursif=true) |
| virtual void | getChilds (LPTYElementArray &childs, bool recursif=true) |
| virtual void | setInCurrentCalcul (bool state, bool recurschild=true, bool recursparent=true) |
| virtual bool | isInCurrentCalcul () |
| void | addCopy () |
| Increment le compteur de nombre de copies. More... | |
| void | setCopyCount (const unsigned int copyCount) |
| Modifie la vaeur du compteur. More... | |
Public Member Functions inherited from IRefCount | |
| IRefCount () | |
| virtual | ~IRefCount () |
| virtual int | incRef () |
| virtual int | decRef () |
| int | getRefCount () const |
Public Member Functions inherited from OPrototype | |
| virtual | ~OPrototype () |
| virtual OPrototype * | clone () const =0 |
| virtual const char * | getClassName () const |
| bool | isA (const char *className) const |
Public Member Functions inherited from OSpectre | |
| OSpectre () | |
| Default constructor, the spectrum module is defined by the _defaultValue. More... | |
| OSpectre (double defaultValue) | |
| Constructor, the spectrum module is defined by the defaultValue given in parameter. More... | |
| OSpectre (const OSpectre &other) | |
| Copy constructor. More... | |
| OSpectre (const OSpectreAbstract &other) | |
| Copy constructor from OSpectreAbstract. More... | |
| OSpectre (const double *valeurs, unsigned nbVal, unsigned decalage) | |
| Constructor from an array (needed for the Harmonoise model) More... | |
| virtual | ~OSpectre () |
| Destructor. More... | |
| OSpectre & | operator= (const OSpectre &other) |
| operator= More... | |
| OSpectreAbstract & | operator= (const OSpectreAbstract &other) override |
| operator= More... | |
| virtual bool | operator== (const OSpectre &other) const |
| operator== More... | |
| virtual bool | operator!= (const OSpectre &other) const |
| operator != More... | |
| double * | getTabValReel () override |
| const double * | getTabValReel () const override |
| OSpectreAbstract * | getConcreteInstance () const override |
| Return an instance of a concrete class of the same type as current. More... | |
| void | setValue (const double &freq, const double &reel=0.0) |
| double | getValueReal (double freq) |
| bool | isTonalite () const |
| Existence d'une tonalite marquee. More... | |
Public Member Functions inherited from OSpectreAbstract | |
| OSpectreAbstract () | |
| Methods. More... | |
| OSpectreAbstract (TYSpectreForm form) | |
| OSpectreAbstract (bool isValid, TYSpectreType type, TYSpectreEtat etat, TYSpectreForm form) | |
| virtual bool | operator== (const OSpectreAbstract &other) const |
| operator== More... | |
| virtual bool | operator!= (const OSpectreAbstract &other) const |
| operator != More... | |
| OSpectreAbstract & | operator+ (const double &valeur) const |
| Add a constant value to all the spectrum. More... | |
| OSpectreAbstract & | operator+ (const OSpectreAbstract &spectre) const |
| Arithmetic sum of two spectrums in one-third Octave. More... | |
| OSpectreAbstract & | operator- (const OSpectreAbstract &spectre) const |
| Arithmetic subtraction of two spectrums in one-third Octave. More... | |
| OSpectreAbstract & | operator* (const OSpectreAbstract &spectre) const |
| Multiplication by a Spectre spectrum. More... | |
| OSpectreAbstract & | operator* (const double &coefficient) const |
| Multiplication by a double coefficient. More... | |
| OSpectreAbstract & | sumdB (const OSpectreAbstract &spectre) const |
| Energetic sum of two spectrums. More... | |
| void | setDefaultValue (const double &valeur=TY_SPECTRE_DEFAULT_VALUE) |
| bool | isValid () const |
| Check the spectrum validity. Invalidity is caused by: corrupted data, impossible calculation. More... | |
| void | setValid (const bool &valid=true) |
| TYSpectreType | getType () const |
| Get the spectrum type. More... | |
| void | setType (TYSpectreType type) |
| Set the spectrum type. More... | |
| TYSpectreEtat | getEtat () const |
| Get the spectrum state. More... | |
| const TYSpectreEtat | getEtat () |
| void | setEtat (TYSpectreEtat etat) |
| Force the spectrum state (to use carefully ...) More... | |
| TYSpectreForm | getForm () const |
| Get the spectrum form. More... | |
| void | setForm (TYSpectreForm form) |
| Force the spectrum state (to use carefully ...) More... | |
| unsigned int | getNbValues () const |
| Number of values in the spectrum. More... | |
| void | setDefaultValue (double module[], const unsigned int spectreNbElmt=TY_SPECTRE_DEFAULT_NB_ELMT, const double &valeur=TY_SPECTRE_DEFAULT_VALUE) |
| void | getRangeValueReal (double *valeurs, const short &nbVal, const short &decalage) |
| OSpectreAbstract & | sum (const OSpectreAbstract &spectre) const |
| Arithmetic sum of two spectrums in one-third Octave. More... | |
| OSpectreAbstract & | sum (const double &value) const |
| Arithmetic sum of a spectrum and a double scalar. More... | |
| OSpectreAbstract & | mult (const OSpectreAbstract &spectre) const |
| Multiplication of two spectrums. More... | |
| OSpectreAbstract & | mult (const double &coefficient) const |
| Multiply this spectrum par a double scalar. More... | |
| OSpectreAbstract & | div (const OSpectreAbstract &spectre) const |
| Division of two spectrums. More... | |
| OSpectreAbstract & | div (const double &coefficient) const |
| Division of this spectrum by a double scalar. More... | |
| OSpectreAbstract & | subst (const OSpectreAbstract &spectre) const |
| Arithmetic subtraction of two spectrums in one-third Octave. More... | |
| OSpectreAbstract & | subst (const double &valeur) const |
| Subtract a constant value to this spectrum. More... | |
| OSpectreAbstract & | invMult (const double &coefficient=1.0) const |
| Division of a double constant by this spectrum. More... | |
| OSpectreAbstract & | inv () const |
| Division of one by this spectrum. More... | |
| OSpectreAbstract & | power (const double &puissance) const |
| Return a spectrum as this spectrum raised to a double power. More... | |
| OSpectreAbstract & | log (const double &base=10.0) const |
| Compute the log base n of this spectrum (n=10 by default). More... | |
| OSpectreAbstract & | racine () const |
| Compute the root square of this spectrum. More... | |
| OSpectreAbstract & | exp (const double coef=1.0) |
| Compute e^(coef * spectre) of this spectrum. More... | |
| OSpectreAbstract & | sin () const |
| Compute the sin of this spectrum. More... | |
| OSpectreAbstract & | cos () const |
| Compute the cos of this spectrum. More... | |
| OSpectreAbstract & | abs () const |
| Return the absolute value of this spectrum. More... | |
| OSpectreAbstract & | sqrt () const |
| Return the root square of a spectrum. More... | |
| double | valMax () |
| Return the maximum value of a spectrum. More... | |
| OSpectreAbstract & | seuillage (const double &min=-200.0, const double max=200.0) |
| Limit the spectrum values (min and max) More... | |
| double | sigma () |
| Sum the values of the spectrum. More... | |
| const double | sigma () const |
| OSpectreAbstract & | toDB () const |
| Converts to dB. More... | |
| OSpectreAbstract & | toGPhy () const |
| Converts to physical quantity. More... | |
| double | valGlobDBLin () const |
| Compute the global value dB[Lin] of a one-third Octave spectrum. More... | |
| double | valGlobDBA () const |
| Compute the global value dB[A] of a one-third Octave spectrum. More... | |
| OSpectreAbstract & | toTOct () const |
| Converts to one-third Octave. More... | |
| OSpectreAbstract & | toOct () const |
| Converts to Octave. More... | |
| OSpectreAbstract & | round () |
| virtual void | printme () const |
| Print the spectrum. More... | |
Static Public Member Functions | |
| static TYSpectre | getEmptyLinSpectre (const double &valInit=1.0E-20) |
| Cree un spectre en lin. More... | |
| static TYSpectre | pondA () |
| Construit un spectre de ponderation A. More... | |
| static TYSpectre | pondB () |
| Construit un spectre de ponderation B. More... | |
| static TYSpectre | pondC () |
| Construit un spectre de ponderation C. More... | |
| static TYSpectre | getLambda (const double &c) |
| static void | setXMLPrecision (const int precision=2) |
| Get/Set de la precision de stockage des resultats (XML) More... | |
| static int | getXMLPrecision () |
| Get/Set de la precision de stockage des resultats (XML) More... | |
| static const TYTabFreq | getTabFreqNorm (TYSpectreForm form=SPECTRE_FORM_TIERS) |
| static const float | getFreqNorm (int freqIndex) |
Static Public Member Functions inherited from TYElement | |
| static LPTYElementArray | findTypeCollectionAndCallFromXML (DOM_Element parentElem, const char *type) |
| static void | setLogInstances (bool log) |
| static bool | getLogInstances () |
| static TYElement * | getInstance (TYUUID uuid) |
| static void | purgeInstances () |
| static bool | testId (const TYUUID &id, const TYElement *pElem) |
| static TYUUID | newID () |
| static TYUUID | fromString (QString id) |
| static QString | toString (TYUUID &uuid) |
| static uint64 | getConstructorCount () |
| static uint64 | getDestructorCount () |
| static uint64 | getIdGenerationCount () |
| static bool | getIsSavedOk () |
| static void | setIsSavedOk (const bool &toSave) |
| static void | setRegenerateID (const bool &bRegenerate) |
| static bool | getRegenerateID () |
Static Public Member Functions inherited from OPrototype | |
| static OPrototype * | findAndClone (const char *className) |
| static int | findPrototype (const char *className) |
| static OPrototype * | safeDownCast (OPrototype *pObject) |
| static void | add_factory (const char *, IOProtoFactory::ptr_type factory) |
Static Public Member Functions inherited from OSpectre | |
| static OSpectre | getEmptyLinSpectre (const double &valInit=1.0E-20) |
| Create a physical quantity spectrum. More... | |
| static OSpectre | makeOctSpect () |
| Make a spectrum in Octave. More... | |
| static int | getIndice (const double &freq) |
| Return the index associated to a frequency. More... | |
| static void | setFMin (const double &fMin) |
| Define minimal frequency. More... | |
| static void | setFMax (const double &fMax) |
| Define maximal frequency. More... | |
| static OTabFreq | getTabFreqExact () |
| static OSpectre | getOSpectreFreqExact () |
| Return the spectrum of the exact frequencies. More... | |
| static std::map< double, int > | setMapFreqIndice () |
| Construction du tableau frequence/indice. More... | |
| static OSpectre | pondA () |
| Build a weighted spectrum A. More... | |
| static OSpectre | pondB () |
| Build a weighted spectrum B. More... | |
| static OSpectre | pondC () |
| Build a weighted spectrum C. More... | |
| static OSpectre | getLambda (const double &c) |
Static Public Member Functions inherited from OSpectreAbstract | |
| static OSpectreAbstract & | makeOctSpect () |
| Make a spectrum in Octave. More... | |
Protected Attributes | |
| bool | _isReadOnly |
| Indique si la widget du spectre est read-only. More... | |
| QString | _remarque |
| Remarques. More... | |
Protected Attributes inherited from TYElement | |
| QString | _name |
| Nom courant de l'element. More... | |
| TYElement * | _pParent |
| Reference sur l'element parent. More... | |
| bool | _bPutInInstanceList |
| unsigned int | _copyCount |
| bool | _inCurrentCalcul |
| Indique si cet element est actif dans le Calcul courant. More... | |
| bool | _isAcousticModified |
| Indicateur de modification acoustique. More... | |
| bool | _isGeometryModified |
| Indicateur de modification de la geometrie. More... | |
| LPTYElementGraphic | _pGraphicObject |
| L'object graphique metier associe a cet element. More... | |
| void * | _allUses |
| Multi purpose void pointer (use for compatibility actually) More... | |
Protected Attributes inherited from IRefCount | |
| int | m_refCount |
| The reference counter. More... | |
Protected Attributes inherited from OSpectre | |
| double | _module [TY_SPECTRE_DEFAULT_NB_ELMT] |
| Real values array for module. More... | |
Protected Attributes inherited from OSpectreAbstract | |
| bool | _valid |
| Spectrum validity. More... | |
| TYSpectreType | _type |
| Spectrum type. More... | |
| TYSpectreEtat | _etat |
| Spectrum state (physical quantity or dB). More... | |
| TYSpectreForm | _form |
| Representation of the spectrum: one-third Octave, Octave, constant delta f, unstructured. More... | |
Static Protected Attributes | |
| static int | _XMLprecision = 2 |
| Precision de stockage des resultats. More... | |
Static Protected Attributes inherited from OSpectre | |
| static const double | _freqNorm [] |
| Array of center frequencies (Hz) normalized in one-third Octave. More... | |
| static double | _fMin = 16 |
| Minimal frequency. More... | |
| static double | _fMax = 16000 |
| Maximal frequency. More... | |
| static std::map< double, int > | _mapFreqIndice = setMapFreqIndice() |
| Mapping between frequency and array index. More... | |
Static Protected Attributes inherited from OSpectreAbstract | |
| static double | _defaultValue = TY_SPECTRE_DEFAULT_VALUE |
| Default value for the spectrum. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from OPrototype | |
| OPrototype () | |
Permet de stocker des valeurs de puissance accoustique pour differentes frequences.
Definition at line 32 of file TYSpectre.h.
| TYSpectre::TYSpectre | ( | const double & | defaultValue = TY_SPECTRE_DEFAULT_VALUE | ) |
Constructeur par defaut.
Definition at line 32 of file TYSpectre.cpp.

| TYSpectre::TYSpectre | ( | const OSpectre & | spectre | ) |
Constructeur a partir d'un OSpectre
Definition at line 45 of file TYSpectre.cpp.

| TYSpectre::TYSpectre | ( | OSpectreAbstract & | spectreAbstract | ) |
Constructeur a partir d'un OSpectreAbstract
Definition at line 53 of file TYSpectre.cpp.

| TYSpectre::TYSpectre | ( | const OSpectreComplex & | spectre | ) |
Constructeur a partir d'un OSpectreComplex.
Definition at line 61 of file TYSpectre.cpp.

| TYSpectre::TYSpectre | ( | const TYSpectre & | other | ) |
Constructeur par copie.
Definition at line 40 of file TYSpectre.cpp.
|
virtual |
Destructeur.
Definition at line 71 of file TYSpectre.cpp.
|
virtual |
Fonction de copie recursive (virtuelle)
| pOther | destination de la copy |
| copyId | vrai par defaut |
| pUseCopyTag | faux par defaut |
Reimplemented from TYElement.
Definition at line 142 of file TYSpectre.cpp.


|
inline |
: return spectrum casted as OSpectre
Definition at line 202 of file TYSpectre.h.
|
virtual |
Export du spectre au format csv en creant le fichier.
Definition at line 385 of file TYSpectre.cpp.

|
virtual |
Export du spectre au format csv sur un flux transmis.
Definition at line 396 of file TYSpectre.cpp.

|
virtual |
|
virtual |
Extrait les informations a partir du noeud DOM passe afin de recuperer les parametres de la classe.
| domElement | Le noeud DOM a partir duquel les parametres doivent etre recuperes. |
Reimplemented from TYElement.
Definition at line 204 of file TYSpectre.cpp.


|
virtual |
|
static |
Cree un spectre en lin.
Definition at line 451 of file TYSpectre.cpp.


|
inlinevirtual |
Set/Get de la forme du spectre.
Definition at line 107 of file TYSpectre.h.

|
static |
Retourne la frequence correspondant a l'index freqIndex.
Definition at line 441 of file TYSpectre.cpp.
|
inlinevirtual |
Set/Get du flag de conservation en BDD.
Set/Get du flag de conservation en BDD. Set/Get du flag _isReadOnly.
Definition at line 135 of file TYSpectre.h.

|
static |
Retourne un spectre representant la longueur d'onde associee a chaque frequence
| c | Vitesse de propagation de l'onde |
Definition at line 479 of file TYSpectre.cpp.

|
inlinevirtual |
Set/Get des remarques.
Definition at line 117 of file TYSpectre.h.

|
static |
Retourne le tableau des frequences normalisees. L'appelant ne doit pas liberer la memoire allouee pour creer ce tableau.
Definition at line 419 of file TYSpectre.cpp.

|
inlinestatic |
Get/Set de la precision de stockage des resultats (XML)
Definition at line 180 of file TYSpectre.h.

|
virtual |
Operateur d'inegalite.
Definition at line 137 of file TYSpectre.cpp.

Operateur d'affectation depuis un OSpectre.
Definition at line 86 of file TYSpectre.cpp.

|
virtual |
Operateur d'affectation depuis un OSpectreAbstract.
Reimplemented from OSpectreAbstract.
Definition at line 97 of file TYSpectre.cpp.

Operateur d'affectation.
Definition at line 73 of file TYSpectre.cpp.


|
virtual |
Operateur d'egalite.
Definition at line 108 of file TYSpectre.cpp.

|
static |
Construit un spectre de ponderation A.
Definition at line 457 of file TYSpectre.cpp.

|
static |
Construit un spectre de ponderation B.
Definition at line 463 of file TYSpectre.cpp.

|
static |
Construit un spectre de ponderation C.
Definition at line 469 of file TYSpectre.cpp.

|
inlinevirtual |
|
inlinevirtual |
Set/Get du flag _isReadOnly.
Definition at line 141 of file TYSpectre.h.

|
inlinevirtual |
Set/Get des remarques.
Definition at line 123 of file TYSpectre.h.
|
inlinestatic |
Get/Set de la precision de stockage des resultats (XML)
Definition at line 174 of file TYSpectre.h.

|
virtual |
Retourne une chaine de caractere donnant des informations sur cet objet (utile pour le debugage).
Reimplemented from TYElement.
Definition at line 159 of file TYSpectre.cpp.
|
virtual |
|
virtual |
Construit une arborescence DOM a partir du noeud passe afin de sauvegarder les parametres au format XML.
| domElement | Le noeud DOM parent a partir duquel l'arborescence doit etre creee. |
Reimplemented from TYElement.
Definition at line 164 of file TYSpectre.cpp.


|
virtual |
|
protected |
Indique si la widget du spectre est read-only.
Definition at line 215 of file TYSpectre.h.
|
protected |
Remarques.
Definition at line 218 of file TYSpectre.h.
|
staticprotected |
Precision de stockage des resultats.
Definition at line 212 of file TYSpectre.h.