This is a binned representation of a PeakSpectrum. More...
#include <OpenMS/COMPARISON/SPECTRA/BinnedSpectrum.h>
Classes | |
| class | NoSpectrumIntegrated |
| Exception which is thrown if BinnedSpectrum bins are accessed and no PeakSpektrum has been integrated yet i.e. bins_ is empty. More... | |
Public Types | |
| typedef SparseVector< Real > ::const_iterator | const_bin_iterator |
| typedef SparseVector< Real > ::iterator | bin_iterator |
Public Member Functions | |
| BinnedSpectrum () | |
| default constructor | |
| BinnedSpectrum (Real size, UInt spread, PeakSpectrum ps) | |
| detailed constructor | |
| BinnedSpectrum (const BinnedSpectrum &source) | |
| copy constructor | |
| virtual | ~BinnedSpectrum () |
| destructor | |
| BinnedSpectrum & | operator= (const BinnedSpectrum &source) |
| assignment operator | |
| BinnedSpectrum & | operator= (const PeakSpectrum &source) |
| assignment operator for PeakSpectra | |
| bool | operator== (const BinnedSpectrum &rhs) const |
| equality operator | |
| bool | operator!= (const BinnedSpectrum &rhs) const |
| inequality operator | |
| bool | operator== (const PeakSpectrum &rhs) const |
| equality operator for PeakSpectra | |
| bool | operator!= (const PeakSpectrum &rhs) const |
| inequality operator for PeakSpectra | |
| double | getBinSize () const |
| get the BinSize | |
| UInt | getBinSpread () const |
| get the BinSpread | |
| UInt | getBinNumber () const |
| get the BinNumber, number of Bins | |
| UInt | getFilledBinNumber () const |
| get the FilledBinNumber, number of filled Bins | |
| const SparseVector< Real > & | getBins () const |
| SparseVector< Real > & | getBins () |
| const_bin_iterator | begin () const |
| returns the const begin iterator of the container | |
| const_bin_iterator | end () const |
| returns the const end iterator of the container | |
| bin_iterator | begin () |
| returns the begin iterator of the container | |
| bin_iterator | end () |
| returns the end iterator of the container | |
| void | setBinSize (double s) |
| void | setBinSpread (UInt s) |
| void | setBinning () |
| bool | checkCompliance (const BinnedSpectrum &bs) const |
| function to check comparability of two BinnedSpectrum objects, i.e. if they have equal bin size and spread | |
Protected Member Functions | |
| virtual void | clearChildIds_ () |
| Clears the persistence id of all sub-objects. | |
Private Attributes | |
| UInt | bin_spread_ |
| Real | bin_size_ |
| SparseVector< Real > | bins_ |
This is a binned representation of a PeakSpectrum.
| sz | the size of the bins and | |
| sp | number of neighboring bins to both sides affected by a peak contribution | |
| ps | the peakspectrum, that shall be represented |
sz denotes the size of a bin in Th, thereby deciding the number of bins(all of size sz) the spectrum is discretized to. Each bin will represent a certain Th range and the peaks will be put in the respective bins and sum up inside. sp denotes the number of neighboring bins to the left and the number of neighboring bins to the right a peak is also added to. E.g. a BinnedSpectrum with binsize of 0.5 Th will have a peak at 100 Th in bin no. 200, a peak at 100.1 Th will be in bin no. 201. If the binspread is 1, the peak at 100 Th will be added to bin no. 199, 200 and 201. If the binspread is 2, the peak at 100 Th will also be added to bin no. 198 and 202, and so on.
| typedef SparseVector<Real>::iterator bin_iterator |
| typedef SparseVector<Real>::const_iterator const_bin_iterator |
| BinnedSpectrum | ( | ) |
default constructor
| BinnedSpectrum | ( | Real | size, | |
| UInt | spread, | |||
| PeakSpectrum | ps | |||
| ) |
detailed constructor
| BinnedSpectrum | ( | const BinnedSpectrum & | source | ) |
copy constructor
| virtual ~BinnedSpectrum | ( | ) | [virtual] |
destructor
| const_bin_iterator begin | ( | ) | const [inline] |
returns the const begin iterator of the container
| bin_iterator begin | ( | ) | [inline] |
returns the begin iterator of the container
| bool checkCompliance | ( | const BinnedSpectrum & | bs | ) | const |
function to check comparability of two BinnedSpectrum objects, i.e. if they have equal bin size and spread
| virtual void clearChildIds_ | ( | ) | [inline, protected, virtual] |
Clears the persistence id of all sub-objects.
Reimplemented from MSSpectrum<>.
| bin_iterator end | ( | ) | [inline] |
returns the end iterator of the container
| const_bin_iterator end | ( | ) | const [inline] |
returns the const end iterator of the container
| UInt getBinNumber | ( | ) | const [inline] |
get the BinNumber, number of Bins
| const SparseVector<Real>& getBins | ( | ) | const [inline] |
unmutable access to the Bincontainer
| NoSpectrumIntegrated | is thrown if no spectrum was integrated |
Referenced by BinnedSpectrum::operator=().
| SparseVector<Real>& getBins | ( | ) | [inline] |
mutable access to the Bincontainer
| NoSpectrumIntegrated | is thrown if no spectrum was integrated |
| double getBinSize | ( | ) | const [inline] |
get the BinSize
Referenced by BinnedSpectrum::operator=(), and BinnedSpectrum::operator==().
| UInt getBinSpread | ( | ) | const [inline] |
get the BinSpread
Referenced by BinnedSpectrum::operator=(), and BinnedSpectrum::operator==().
| UInt getFilledBinNumber | ( | ) | const [inline] |
get the FilledBinNumber, number of filled Bins
| bool operator!= | ( | const BinnedSpectrum & | rhs | ) | const [inline] |
inequality operator
| bool operator!= | ( | const PeakSpectrum & | rhs | ) | const [inline] |
inequality operator for PeakSpectra
| BinnedSpectrum& operator= | ( | const PeakSpectrum & | source | ) | [inline] |
assignment operator for PeakSpectra
| BinnedSpectrum& operator= | ( | const BinnedSpectrum & | source | ) | [inline] |
assignment operator
References BinnedSpectrum::getBins(), BinnedSpectrum::getBinSize(), and BinnedSpectrum::getBinSpread().
| bool operator== | ( | const PeakSpectrum & | rhs | ) | const [inline] |
equality operator for PeakSpectra
| bool operator== | ( | const BinnedSpectrum & | rhs | ) | const [inline] |
equality operator
References BinnedSpectrum::getBinSize(), and BinnedSpectrum::getBinSpread().
| void setBinning | ( | ) |
makes the binning: all Peaks of the containing PeakSpectrum are summed up in the bins corresponding to m/z ranges
| NoSpectrumIntegrated | is thrown if no spectrum was integrated before |
| void setBinSize | ( | double | s | ) | [inline] |
sets the BinSize_ (and rebinnes)
| s | defines the size of the bins |
| NoSpectrumIntegrated | is thrown if no spectrum is integrated |
| void setBinSpread | ( | UInt | s | ) | [inline] |
sets the BinSpread_ (and rebinnes)
| s | defines the binning spread, given as positive integer |
| NoSpectrumIntegrated | is thrown if no spec was integrated into the instance |
UInt bin_spread_ [private] |
SparseVector<Real> bins_ [private] |
| OpenMS / TOPP release 1.10.0 | Documentation generated on Thu Mar 7 2013 09:42:50 using doxygen 1.7.1 |