|
Code_TYMPAN
4.4.0
Industrial site acoustic simulation
|
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>

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 Spectrum & | operator() (size_t receptor_idx, size_t sources_idx) const |
| operator() More... | |
| Spectrum & | operator() (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 |
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.
| typedef std::vector<std::vector<Spectrum> > tympan::SpectrumMatrix::impl_matrix_t |
Definition at line 20 of file spectrum_matrix.h.
| tympan::SpectrumMatrix::SpectrumMatrix | ( | ) |
Default constructor.
Definition at line 11 of file spectrum_matrix.cpp.
| 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.

| tympan::SpectrumMatrix::SpectrumMatrix | ( | const SpectrumMatrix & | matrix | ) |
Copy constructor.
Definition at line 13 of file spectrum_matrix.cpp.

|
inlinevirtual |
Destructor.
Definition at line 29 of file spectrum_matrix.h.
| 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.


|
inline |
Clear the matrix.
Definition at line 55 of file spectrum_matrix.h.

| 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.


|
inline |
Number of rows (receptors) of the matrix.
Definition at line 37 of file spectrum_matrix.h.

|
inline |
Number of columns (sources) of the matrix.
Definition at line 32 of file spectrum_matrix.h.

| Spectrum & tympan::SpectrumMatrix::operator() | ( | size_t | receptor_idx, |
| size_t | sources_idx | ||
| ) |
| const Spectrum & tympan::SpectrumMatrix::operator() | ( | size_t | receptor_idx, |
| size_t | sources_idx | ||
| ) | const |
operator()
Definition at line 52 of file spectrum_matrix.cpp.

| 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.


| 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.

|
private |
Definition at line 67 of file spectrum_matrix.h.
|
protected |
Matrix.
Definition at line 64 of file spectrum_matrix.h.