|
Code_TYMPAN
4.4.0
Industrial site acoustic simulation
|
Store acoustic power values for different frequencies. More...
#include <spectre.h>

Public Member Functions | |
| OSpectreAbstract () | |
| Methods. More... | |
| OSpectreAbstract (TYSpectreForm form) | |
| OSpectreAbstract (bool isValid, TYSpectreType type, TYSpectreEtat etat, TYSpectreForm form) | |
| virtual OSpectreAbstract & | operator= (const OSpectreAbstract &other) |
| operator= More... | |
| 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... | |
| virtual double * | getTabValReel ()=0 |
| Get the array of real values - Pure virtual method. More... | |
| virtual const double * | getTabValReel () const =0 |
| virtual OSpectreAbstract * | getConcreteInstance () const =0 |
| Return an instance of a concrete class of the same type as current. 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 OSpectreAbstract & | makeOctSpect () |
| Make a spectrum in Octave. More... | |
Protected Attributes | |
| 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 double | _defaultValue = TY_SPECTRE_DEFAULT_VALUE |
| Default value for the spectrum. More... | |
|
explicit |
|
explicit |
Definition at line 58 of file spectre.cpp.
|
explicit |
Definition at line 63 of file spectre.cpp.
| OSpectreAbstract & OSpectreAbstract::abs | ( | ) | const |
Return the absolute value of this spectrum.
Definition at line 493 of file spectre.cpp.

| OSpectreAbstract & OSpectreAbstract::cos | ( | ) | const |
Compute the cos of this spectrum.
Definition at line 478 of file spectre.cpp.


| OSpectreAbstract & OSpectreAbstract::div | ( | const double & | coefficient | ) | const |
Division of this spectrum by a double scalar.
Definition at line 294 of file spectre.cpp.

| OSpectreAbstract & OSpectreAbstract::div | ( | const OSpectreAbstract & | spectre | ) | const |
Division of two spectrums.
Definition at line 273 of file spectre.cpp.


| OSpectreAbstract & OSpectreAbstract::exp | ( | const double | coef = 1.0 | ) |
Compute e^(coef * spectre) of this spectrum.
Definition at line 449 of file spectre.cpp.


|
pure virtual |
Return an instance of a concrete class of the same type as current.
Implemented in OSpectreOctave, and OSpectre.

|
inline |
|
inline |
|
inline |
| unsigned int OSpectreAbstract::getNbValues | ( | ) | const |
Number of values in the spectrum.
Definition at line 182 of file spectre.cpp.

| void OSpectreAbstract::getRangeValueReal | ( | double * | valeurs, |
| const short & | nbVal, | ||
| const short & | decalage | ||
| ) |
Get an interval of real values from the frequencies/complex array
| [out] | valeurs | Values array. It should be allocated before. |
| [in] | nbVal | Number of values to retrieve from the spectrum |
| [in] | decalage | Index of the first value to retrieve |
Definition at line 211 of file spectre.cpp.

|
pure virtual |
Implemented in OSpectreOctave, and OSpectre.
|
pure virtual |
Get the array of real values - Pure virtual method.
Implemented in OSpectreOctave, and OSpectre.

|
inline |
| OSpectreAbstract & OSpectreAbstract::inv | ( | ) | const |
Division of one by this spectrum.
Definition at line 367 of file spectre.cpp.

| OSpectreAbstract & OSpectreAbstract::invMult | ( | const double & | coefficient = 1.0 | ) | const |
Division of a double constant by this spectrum.
Definition at line 345 of file spectre.cpp.


|
inline |
| OSpectreAbstract & OSpectreAbstract::log | ( | const double & | base = 10.0 | ) | const |
Compute the log base n of this spectrum (n=10 by default).
Definition at line 404 of file spectre.cpp.


|
static |
Make a spectrum in Octave.
Definition at line 832 of file spectre.cpp.


| OSpectreAbstract & OSpectreAbstract::mult | ( | const double & | coefficient | ) | const |
Multiply this spectrum par a double scalar.
Definition at line 257 of file spectre.cpp.

| OSpectreAbstract & OSpectreAbstract::mult | ( | const OSpectreAbstract & | spectre | ) | const |
Multiplication of two spectrums.
Definition at line 243 of file spectre.cpp.


|
virtual |
| OSpectreAbstract & OSpectreAbstract::operator* | ( | const double & | coefficient | ) | const |
Multiplication by a double coefficient.
Definition at line 158 of file spectre.cpp.

| OSpectreAbstract & OSpectreAbstract::operator* | ( | const OSpectreAbstract & | spectre | ) | const |
Multiplication by a Spectre spectrum.
Definition at line 146 of file spectre.cpp.

| OSpectreAbstract & OSpectreAbstract::operator+ | ( | const double & | valeur | ) | const |
Add a constant value to all the spectrum.
Definition at line 109 of file spectre.cpp.

| OSpectreAbstract & OSpectreAbstract::operator+ | ( | const OSpectreAbstract & | spectre | ) | const |
Arithmetic sum of two spectrums in one-third Octave.
Definition at line 122 of file spectre.cpp.

| OSpectreAbstract & OSpectreAbstract::operator- | ( | const OSpectreAbstract & | spectre | ) | const |
Arithmetic subtraction of two spectrums in one-third Octave.
Definition at line 134 of file spectre.cpp.

|
virtual |
operator=
Reimplemented in OSpectreOctave, OSpectreComplex, OSpectre, and TYSpectre.
Definition at line 68 of file spectre.cpp.

|
virtual |
| OSpectreAbstract & OSpectreAbstract::power | ( | const double & | puissance | ) | const |
Return a spectrum as this spectrum raised to a double power.
Definition at line 389 of file spectre.cpp.

|
virtual |
Print the spectrum.
Definition at line 822 of file spectre.cpp.

| OSpectreAbstract & OSpectreAbstract::racine | ( | ) | const |
Compute the root square of this spectrum.
Definition at line 427 of file spectre.cpp.

| OSpectreAbstract & OSpectreAbstract::round | ( | ) |
Rounds the spectrum values to two digits.
This method is used to round Lw spectrum values to avoid precision issues when testing 17534-3 conformity.
Definition at line 573 of file spectre.cpp.


| void OSpectreAbstract::setDefaultValue | ( | const double & | valeur = TY_SPECTRE_DEFAULT_VALUE | ) |
Initialize a spectrum to a default value.
| valeur | Value by default. |
Definition at line 197 of file spectre.cpp.


| void OSpectreAbstract::setDefaultValue | ( | double | module[], |
| const unsigned int | spectreNbElmt = TY_SPECTRE_DEFAULT_NB_ELMT, |
||
| const double & | valeur = TY_SPECTRE_DEFAULT_VALUE |
||
| ) |
Definition at line 202 of file spectre.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
| OSpectreAbstract & OSpectreAbstract::seuillage | ( | const double & | min = -200.0, |
| const double | max = 200.0 |
||
| ) |
Limit the spectrum values (min and max)
Definition at line 532 of file spectre.cpp.


| double OSpectreAbstract::sigma | ( | ) |
Sum the values of the spectrum.
Definition at line 553 of file spectre.cpp.


| const double OSpectreAbstract::sigma | ( | ) | const |
| OSpectreAbstract & OSpectreAbstract::sin | ( | ) | const |
Compute the sin of this spectrum.
Definition at line 464 of file spectre.cpp.


| OSpectreAbstract & OSpectreAbstract::sqrt | ( | ) | const |
Return the root square of a spectrum.
Definition at line 507 of file spectre.cpp.


| OSpectreAbstract & OSpectreAbstract::subst | ( | const double & | valeur | ) | const |
Subtract a constant value to this spectrum.
Definition at line 330 of file spectre.cpp.

| OSpectreAbstract & OSpectreAbstract::subst | ( | const OSpectreAbstract & | spectre | ) | const |
Arithmetic subtraction of two spectrums in one-third Octave.
Definition at line 316 of file spectre.cpp.


| OSpectreAbstract & OSpectreAbstract::sum | ( | const double & | value | ) | const |
Arithmetic sum of a spectrum and a double scalar.
Definition at line 234 of file spectre.cpp.

| OSpectreAbstract & OSpectreAbstract::sum | ( | const OSpectreAbstract & | spectre | ) | const |
Arithmetic sum of two spectrums in one-third Octave.
Definition at line 219 of file spectre.cpp.


| OSpectreAbstract & OSpectreAbstract::sumdB | ( | const OSpectreAbstract & | spectre | ) | const |
Energetic sum of two spectrums.
Definition at line 171 of file spectre.cpp.


| OSpectreAbstract & OSpectreAbstract::toDB | ( | ) | const |
Converts to dB.
Definition at line 590 of file spectre.cpp.


| OSpectreAbstract & OSpectreAbstract::toGPhy | ( | ) | const |
Converts to physical quantity.
Definition at line 634 of file spectre.cpp.


| OSpectreAbstract & OSpectreAbstract::toOct | ( | ) | const |
Converts to Octave.
Definition at line 768 of file spectre.cpp.


| OSpectreAbstract & OSpectreAbstract::toTOct | ( | ) | const |
Converts to one-third Octave.
Definition at line 701 of file spectre.cpp.


| double OSpectreAbstract::valGlobDBA | ( | ) | const |
Compute the global value dB[A] of a one-third Octave spectrum.
Definition at line 683 of file spectre.cpp.


| double OSpectreAbstract::valGlobDBLin | ( | ) | const |
Compute the global value dB[Lin] of a one-third Octave spectrum.
Definition at line 671 of file spectre.cpp.


| double OSpectreAbstract::valMax | ( | ) |
Return the maximum value of a spectrum.
Definition at line 522 of file spectre.cpp.

|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |