Code_TYMPAN  4.4.0
Industrial site acoustic simulation
Public Member Functions | Protected Attributes | List of all members
Spectre Class Reference

Spectrum class. More...

#include <Spectre.h>

Collaboration diagram for Spectre:
Collaboration graph
[legend]

Public Member Functions

 Spectre ()
 Default constructor. More...
 
 Spectre (const Spectre &other)
 Copy constructor. More...
 
virtual ~Spectre ()
 Destructor. More...
 
size_t getSizeSpectre ()
 Get the size of the vector storing the spectrum. More...
 
void getFrequencies (std::vector< int > &r)
 Return into a vector all the frequency values of the spectrum. More...
 
void getFrequencies (int *r)
 Return into an array (sized before) all the frequency values of the spectrum. More...
 
int getFrequencie (unsigned int i)
 Get a the ith frequency of the spectrum. More...
 
void getPowers (std::vector< decimal > &r)
 Return into a vector all the power values of the spectrum. More...
 
void getPowers (decimal *r)
 Return into an array (sized before) all the power values of the spectrum. More...
 
decimal getPower (unsigned int i)
 Get the power for a frequency given by its index. More...
 
void addFrequencie (int freq, decimal power)
 Add a new pair (frequency,power) More...
 

Protected Attributes

std::vector< std::pair< int, decimal > > freqs
 Vector of pairs (Frequency,Power) More...
 

Detailed Description

Spectrum class.

Definition at line 24 of file Spectre.h.

Constructor & Destructor Documentation

◆ Spectre() [1/2]

Spectre::Spectre ( )
inline

Default constructor.

Definition at line 29 of file Spectre.h.

◆ Spectre() [2/2]

Spectre::Spectre ( const Spectre other)
inline

Copy constructor.

Definition at line 34 of file Spectre.h.

◆ ~Spectre()

virtual Spectre::~Spectre ( )
inlinevirtual

Destructor.

Definition at line 42 of file Spectre.h.

Member Function Documentation

◆ addFrequencie()

void Spectre::addFrequencie ( int  freq,
decimal  power 
)
inline

Add a new pair (frequency,power)

Definition at line 101 of file Spectre.h.

◆ getFrequencie()

int Spectre::getFrequencie ( unsigned int  i)
inline

Get a the ith frequency of the spectrum.

Definition at line 67 of file Spectre.h.

◆ getFrequencies() [1/2]

void Spectre::getFrequencies ( int *  r)
inline

Return into an array (sized before) all the frequency values of the spectrum.

Definition at line 59 of file Spectre.h.

◆ getFrequencies() [2/2]

void Spectre::getFrequencies ( std::vector< int > &  r)
inline

Return into a vector all the frequency values of the spectrum.

Definition at line 51 of file Spectre.h.

◆ getPower()

decimal Spectre::getPower ( unsigned int  i)
inline

Get the power for a frequency given by its index.

Definition at line 92 of file Spectre.h.

◆ getPowers() [1/2]

void Spectre::getPowers ( decimal *  r)
inline

Return into an array (sized before) all the power values of the spectrum.

Definition at line 84 of file Spectre.h.

◆ getPowers() [2/2]

void Spectre::getPowers ( std::vector< decimal > &  r)
inline

Return into a vector all the power values of the spectrum.

Definition at line 76 of file Spectre.h.

◆ getSizeSpectre()

size_t Spectre::getSizeSpectre ( )
inline

Get the size of the vector storing the spectrum.

Definition at line 45 of file Spectre.h.

Member Data Documentation

◆ freqs

std::vector<std::pair<int, decimal> > Spectre::freqs
protected

Vector of pairs (Frequency,Power)

Definition at line 107 of file Spectre.h.


The documentation for this class was generated from the following file: