1 #ifndef TY_MODELS_COMMON_MATRIX
2 #define TY_MODELS_COMMON_MATRIX
Spectrum matrix N*M used to store results. N is the number of receptors. M is the number of sources.
const std::vector< Spectrum > & by_receptor(size_t receptor_idx) const
Return a vector of Spectrum for a receptor.
void clear()
Clear the matrix.
size_t nb_sources() const
Number of columns (sources) of the matrix.
SpectrumMatrix()
Default constructor.
void clearReceptor(size_t receptor_idx)
Clear the matrix for the a given receptor.
size_t nb_receptors() const
Number of rows (receptors) of the matrix.
void setSpectre(size_t receptor_idx, size_t sources_idx, Spectrum spectrum)
Set a Spectrum into the matrix.
virtual ~SpectrumMatrix()
Destructor.
const Spectrum & operator()(size_t receptor_idx, size_t sources_idx) const
operator()
impl_matrix_t data
Matrix.
std::vector< std::vector< Spectrum > > impl_matrix_t
void resize(size_t nb_receptors, size_t nb_sources)
Resize the matrix (data is cleared)