Index of a peak or feature. More...
#include <OpenMS/KERNEL/PeakIndex.h>
Public Member Functions | |
| PeakIndex () | |
| Default constructor. Creates an invalid peak reference. | |
| PeakIndex (Size peak) | |
| Constructor that sets the peak index (for feaure maps). | |
| PeakIndex (Size spectrum, Size peak) | |
| Constructor that sets the peak and spectrum index (for peak maps). | |
| bool | isValid () const |
| returns if the current peak ref is valid | |
| void | clear () |
| Invalidates the current index. | |
| template<typename FeatureMapType > | |
| const FeatureMapType::value_type & | getFeature (const FeatureMapType &map) const |
| Access to the feature (or consensus feature) corresponding to this index. | |
| template<typename PeakMapType > | |
| const PeakMapType::PeakType & | getPeak (const PeakMapType &map) const |
| Access to a peak corresponding to this index. | |
| template<typename PeakMapType > | |
| const PeakMapType::SpectrumType & | getSpectrum (const PeakMapType &map) const |
| Access to a spectrum corresponding to this index. | |
| bool | operator== (const PeakIndex &rhs) const |
| Equality operator. | |
| bool | operator!= (const PeakIndex &rhs) const |
| Inequality operator. | |
Public Attributes | |
| Size | peak |
| Peak or feature index. | |
| Size | spectrum |
| Spectrum index. | |
Index of a peak or feature.
This struct can be used to store both peak or feature indices.
| PeakIndex | ( | ) | [inline] |
Default constructor. Creates an invalid peak reference.
Constructor that sets the peak and spectrum index (for peak maps).
| void clear | ( | ) | [inline] |
Invalidates the current index.
References PeakIndex::peak, and PeakIndex::spectrum.
| const FeatureMapType::value_type& getFeature | ( | const FeatureMapType & | map | ) | const [inline] |
Access to the feature (or consensus feature) corresponding to this index.
This method is intended for arrays of features e.g. FeatureMap
The main advantage of using this method instead accessing the data directly is that range check performed in debug mode.
| Exception::Precondition | is thrown if this index is invalid for the map (only in debug mode) |
References OPENMS_PRECONDITION, and PeakIndex::peak.
| const PeakMapType::PeakType& getPeak | ( | const PeakMapType & | map | ) | const [inline] |
Access to a peak corresponding to this index.
This method is intended for arrays of DSpectra e.g. MSExperiment
The main advantage of using this method instead accessing the data directly is that range check performed in debug mode.
| Exception::Precondition | is thrown if this index is invalid for the map (only in debug mode) |
References OPENMS_PRECONDITION, PeakIndex::peak, and PeakIndex::spectrum.
| const PeakMapType::SpectrumType& getSpectrum | ( | const PeakMapType & | map | ) | const [inline] |
Access to a spectrum corresponding to this index.
This method is intended for arrays of DSpectra e.g. MSExperiment.
The main advantage of using this method instead accessing the data directly is that range check performed in debug mode.
| Exception::Precondition | is thrown if this index is invalid for the map (only in debug mode) |
References OPENMS_PRECONDITION, and PeakIndex::spectrum.
| bool isValid | ( | ) | const [inline] |
returns if the current peak ref is valid
References PeakIndex::peak.
| bool operator!= | ( | const PeakIndex & | rhs | ) | const [inline] |
Inequality operator.
References PeakIndex::peak, and PeakIndex::spectrum.
| bool operator== | ( | const PeakIndex & | rhs | ) | const [inline] |
Equality operator.
References PeakIndex::peak, and PeakIndex::spectrum.
Peak or feature index.
Referenced by PeakIndex::clear(), PeakIndex::getFeature(), PeakIndex::getPeak(), PeakIndex::isValid(), PeakIndex::operator!=(), and PeakIndex::operator==().
Spectrum index.
Referenced by PeakIndex::clear(), PeakIndex::getPeak(), PeakIndex::getSpectrum(), PeakIndex::operator!=(), and PeakIndex::operator==().
| OpenMS / TOPP release 1.10.0 | Documentation generated on Thu Mar 7 2013 09:42:55 using doxygen 1.7.1 |