35 #ifndef OPENMS_COMPARISON_SPECTRA_BINNEDSPECTRUM_H 36 #define OPENMS_COMPARISON_SPECTRA_BINNEDSPECTRUM_H 87 NoSpectrumIntegrated(
const char* file,
int line,
const char*
function,
const char* message =
"BinnedSpectrum hasn't got a PeakSpectrum to base on yet")
throw();
123 if (raw_spec_ != source)
134 #pragma clang diagnostic push 135 #pragma clang diagnostic ignored "-Wfloat-equal" 140 #pragma clang diagnostic pop 152 return raw_spec_ == rhs;
164 return this->bin_size_;
170 return this->bin_spread_;
219 inline const_bin_iterator
begin()
const 221 return bins_.
begin();
225 inline const_bin_iterator
end()
const 233 return bins_.
begin();
249 if (this->bin_size_ != s)
270 if (this->bin_spread_ != s)
272 this->bin_spread_ = s;
298 #endif //OPENMS_COMPARISON_SPECTRA_BINNEDSPECTRUM_H
bool operator==(const BinnedSpectrum &rhs) const
equality operator
Definition: BinnedSpectrum.h:132
bool operator!=(const PeakSpectrum &rhs) const
inequality operator for PeakSpectra
Definition: BinnedSpectrum.h:156
SparseVector< float > bins_
The computed bins.
Definition: BinnedSpectrum.h:73
float bin_size_
Definition: BinnedSpectrum.h:71
PeakSpectrum raw_spec_
The original raw spectrum.
Definition: BinnedSpectrum.h:75
void setBinSize(double s)
Definition: BinnedSpectrum.h:247
unsigned int UInt
Unsigned integer type.
Definition: Types.h:95
const_bin_iterator begin() const
returns the const begin iterator of the container
Definition: BinnedSpectrum.h:219
bool operator==(_Iterator< _Val, _Ref, _Ptr > const &, _Iterator< _Val, _Ref, _Ptr > const &)
Definition: KDTree.h:806
UInt bin_spread_
Definition: BinnedSpectrum.h:70
bool empty() const
true if the container is empty
Definition: SparseVector.h:188
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
SparseVector< float >::const_iterator const_bin_iterator
Definition: BinnedSpectrum.h:92
bin_iterator end()
returns the end iterator of the container
Definition: BinnedSpectrum.h:237
size_type nonzero_size() const
number of nonzero elements, i.e. the space actually used
Definition: SparseVector.h:176
BinnedSpectrum & operator=(const PeakSpectrum &source)
assignment operator for PeakSpectra
Definition: BinnedSpectrum.h:121
The representation of a 1D spectrum.
Definition: MSSpectrum.h:67
iterator end()
end iterator
Definition: SparseVector.h:401
bin_iterator begin()
returns the begin iterator of the container
Definition: BinnedSpectrum.h:231
UInt getBinNumber() const
get the BinNumber, number of Bins
Definition: BinnedSpectrum.h:174
BinnedSpectrum & operator=(const BinnedSpectrum &source)
assignment operator
Definition: BinnedSpectrum.h:108
iterator begin()
begin iterator
Definition: SparseVector.h:395
Exception base class.
Definition: Exception.h:90
void setBinSpread(UInt s)
Definition: BinnedSpectrum.h:268
This is a binned representation of a PeakSpectrum.
Definition: BinnedSpectrum.h:65
const_bin_iterator end() const
returns the const end iterator of the container
Definition: BinnedSpectrum.h:225
bool operator!=(const BinnedSpectrum &rhs) const
inequality operator
Definition: BinnedSpectrum.h:144
size_type size() const
size of the represented vector
Definition: SparseVector.h:182
double getBinSize() const
get the BinSize
Definition: BinnedSpectrum.h:162
SparseVector< float > & getBins()
Definition: BinnedSpectrum.h:202
UInt getBinSpread() const
get the BinSpread
Definition: BinnedSpectrum.h:168
const SparseVector< float > & getBins() const
Definition: BinnedSpectrum.h:189
bool operator==(const PeakSpectrum &rhs) const
equality operator for PeakSpectra
Definition: BinnedSpectrum.h:150
Exception which is thrown if BinnedSpectrum bins are accessed and no PeakSpektrum has been integrated...
Definition: BinnedSpectrum.h:83
SparseVector< float >::iterator bin_iterator
Definition: BinnedSpectrum.h:93
UInt getFilledBinNumber() const
get the FilledBinNumber, number of filled Bins
Definition: BinnedSpectrum.h:180