Code_TYMPAN  4.4.0
Industrial site acoustic simulation
Public Types | Public Member Functions | Protected Attributes | Private Attributes | List of all members
tympan::SpectrumMatrix Class Reference

Spectrum matrix N*M used to store results. N is the number of receptors. M is the number of sources. More...

#include <spectrum_matrix.h>

Collaboration diagram for tympan::SpectrumMatrix:
Collaboration graph
[legend]

Public Types

typedef std::vector< std::vector< Spectrum > > impl_matrix_t
 

Public Member Functions

 SpectrumMatrix ()
 Default constructor. More...
 
 SpectrumMatrix (size_t nb_receptors, size_t nb_sources)
 Constructor with several receptors and sources. More...
 
 SpectrumMatrix (const SpectrumMatrix &matrix)
 Copy constructor. More...
 
virtual ~SpectrumMatrix ()
 Destructor. More...
 
size_t nb_sources () const
 Number of columns (sources) of the matrix. More...
 
size_t nb_receptors () const
 Number of rows (receptors) of the matrix. More...
 
const Spectrumoperator() (size_t receptor_idx, size_t sources_idx) const
 operator() More...
 
Spectrumoperator() (size_t receptor_idx, size_t sources_idx)
 
void setSpectre (size_t receptor_idx, size_t sources_idx, Spectrum spectrum)
 Set a Spectrum into the matrix. More...
 
const std::vector< Spectrum > & by_receptor (size_t receptor_idx) const
 Return a vector of Spectrum for a receptor. More...
 
void clearReceptor (size_t receptor_idx)
 Clear the matrix for the a given receptor. More...
 
void clear ()
 Clear the matrix. More...
 
void resize (size_t nb_receptors, size_t nb_sources)
 Resize the matrix (data is cleared) More...
 

Protected Attributes

impl_matrix_t data
 Matrix. More...
 

Private Attributes

size_t _nb_sources
 

Detailed Description

Spectrum matrix N*M used to store results. N is the number of receptors. M is the number of sources.

Definition at line 17 of file spectrum_matrix.h.

Member Typedef Documentation

◆ impl_matrix_t

typedef std::vector<std::vector<Spectrum> > tympan::SpectrumMatrix::impl_matrix_t

Definition at line 20 of file spectrum_matrix.h.

Constructor & Destructor Documentation

◆ SpectrumMatrix() [1/3]

tympan::SpectrumMatrix::SpectrumMatrix ( )

Default constructor.

Definition at line 11 of file spectrum_matrix.cpp.

◆ SpectrumMatrix() [2/3]

tympan::SpectrumMatrix::SpectrumMatrix ( size_t  nb_receptors,
size_t  nb_sources 
)

Constructor with several receptors and sources.

Definition at line 6 of file spectrum_matrix.cpp.

Here is the call graph for this function:

◆ SpectrumMatrix() [3/3]

tympan::SpectrumMatrix::SpectrumMatrix ( const SpectrumMatrix matrix)

Copy constructor.

Definition at line 13 of file spectrum_matrix.cpp.

Here is the call graph for this function:

◆ ~SpectrumMatrix()

virtual tympan::SpectrumMatrix::~SpectrumMatrix ( )
inlinevirtual

Destructor.

Definition at line 29 of file spectrum_matrix.h.

Member Function Documentation

◆ by_receptor()

const std::vector< Spectrum > & tympan::SpectrumMatrix::by_receptor ( size_t  receptor_idx) const

Return a vector of Spectrum for a receptor.

Definition at line 73 of file spectrum_matrix.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clear()

void tympan::SpectrumMatrix::clear ( )
inline

Clear the matrix.

Definition at line 55 of file spectrum_matrix.h.

Here is the caller graph for this function:

◆ clearReceptor()

void tympan::SpectrumMatrix::clearReceptor ( size_t  receptor_idx)

Clear the matrix for the a given receptor.

Definition at line 79 of file spectrum_matrix.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nb_receptors()

size_t tympan::SpectrumMatrix::nb_receptors ( ) const
inline

Number of rows (receptors) of the matrix.

Definition at line 37 of file spectrum_matrix.h.

Here is the caller graph for this function:

◆ nb_sources()

size_t tympan::SpectrumMatrix::nb_sources ( ) const
inline

Number of columns (sources) of the matrix.

Definition at line 32 of file spectrum_matrix.h.

Here is the caller graph for this function:

◆ operator()() [1/2]

Spectrum & tympan::SpectrumMatrix::operator() ( size_t  receptor_idx,
size_t  sources_idx 
)

Definition at line 59 of file spectrum_matrix.cpp.

Here is the call graph for this function:

◆ operator()() [2/2]

const Spectrum & tympan::SpectrumMatrix::operator() ( size_t  receptor_idx,
size_t  sources_idx 
) const

operator()

Definition at line 52 of file spectrum_matrix.cpp.

Here is the call graph for this function:

◆ resize()

void tympan::SpectrumMatrix::resize ( size_t  nb_receptors,
size_t  nb_sources 
)

Resize the matrix (data is cleared)

Definition at line 29 of file spectrum_matrix.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setSpectre()

void tympan::SpectrumMatrix::setSpectre ( size_t  receptor_idx,
size_t  sources_idx,
Spectrum  spectrum 
)

Set a Spectrum into the matrix.

Definition at line 66 of file spectrum_matrix.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ _nb_sources

size_t tympan::SpectrumMatrix::_nb_sources
private

Definition at line 67 of file spectrum_matrix.h.

◆ data

impl_matrix_t tympan::SpectrumMatrix::data
protected

Matrix.

Definition at line 64 of file spectrum_matrix.h.


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