OpenMS
2.6.0
|
Index of a peak or feature. More...
#include <OpenMS/KERNEL/PeakIndex.h>
Public Member Functions | |
PeakIndex () | |
Default constructor. Creates an invalid peak reference. More... | |
PeakIndex (Size lpeak) | |
Constructor that sets the peak index (for feature maps) More... | |
PeakIndex (Size lspectrum, Size lpeak) | |
Constructor that sets the peak and spectrum index (for peak maps) More... | |
bool | isValid () const |
returns if the current peak ref is valid More... | |
void | clear () |
Invalidates the current index. More... | |
template<typename FeatureMapType > | |
const FeatureMapType::value_type & | getFeature (const FeatureMapType &map) const |
Access to the feature (or consensus feature) corresponding to this index. More... | |
template<typename PeakMapType > | |
const PeakMapType::PeakType & | getPeak (const PeakMapType &map) const |
Access to a peak corresponding to this index. More... | |
template<typename PeakMapType > | |
const PeakMapType::SpectrumType & | getSpectrum (const PeakMapType &map) const |
Access to a spectrum corresponding to this index. More... | |
bool | operator== (const PeakIndex &rhs) const |
Equality operator. More... | |
bool | operator!= (const PeakIndex &rhs) const |
Inequality operator. More... | |
Public Attributes | |
Size | peak |
Peak or feature index. More... | |
Size | spectrum |
Spectrum index. More... | |
Index of a peak or feature.
This struct can be used to store both peak or feature indices.
|
inline |
Default constructor. Creates an invalid peak reference.
Constructor that sets the peak and spectrum index (for peak maps)
|
inline |
Invalidates the current index.
References PeakIndex::peak, and PeakIndex::spectrum.
|
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.
|
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.
|
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.
|
inline |
returns if the current peak ref is valid
References PeakIndex::peak.
|
inline |
Inequality operator.
References PeakIndex::peak, and PeakIndex::spectrum.
|
inline |
Equality operator.
References PeakIndex::peak, and PeakIndex::spectrum.
Size peak |
Peak or feature index.
Referenced by PeakIndex::clear(), PeakIndex::getFeature(), PeakIndex::getPeak(), PeakIndex::isValid(), PeakIndex::operator!=(), and PeakIndex::operator==().
Size spectrum |
Spectrum index.
Referenced by PeakIndex::clear(), PeakIndex::getPeak(), PeakIndex::getSpectrum(), PeakIndex::operator!=(), and PeakIndex::operator==().