OpenMS
|
Forward iterator for an area of peaks in an experiment. More...
#include <OpenMS/KERNEL/AreaIterator.h>
Classes | |
class | Param |
Public Types | |
typedef double | CoordinateType |
typedef ValueT | PeakType |
typedef SpectrumIteratorT | SpectrumIteratorType |
typedef PeakIteratorT | PeakIteratorType |
using | SpectrumT = typename std::iterator_traits< SpectrumIteratorType >::value_type |
Typedefs for STL compliance, these replace std::iterator | |
typedef std::forward_iterator_tag | iterator_category |
The iterator's category type. More... | |
typedef ValueT | value_type |
The iterator's value type. More... | |
typedef ReferenceT | reference |
The reference type as returned by operator*() More... | |
typedef PointerT | pointer |
The pointer type as returned by operator->() More... | |
typedef unsigned int | difference_type |
The difference type. More... | |
Param | p_ |
holds spectra iterators and area limits More... | |
AreaIterator (const Param &p) | |
Constructor for the begin iterator. More... | |
AreaIterator () | |
Default constructor (for the end iterator) More... | |
~AreaIterator ()=default | |
Destructor. More... | |
AreaIterator (const AreaIterator &rhs)=default | |
Copy constructor. More... | |
AreaIterator & | operator= (const AreaIterator &rhs) |
Assignment operator. More... | |
bool | operator== (const AreaIterator &rhs) const |
Test for equality. More... | |
bool | operator!= (const AreaIterator &rhs) const |
Test for inequality. More... | |
AreaIterator & | operator++ () |
Step forward by one (prefix operator) More... | |
AreaIterator | operator++ (int) |
Step forward by one (postfix operator) More... | |
reference | operator* () const |
Dereferencing of this pointer yields the underlying peak. More... | |
pointer | operator-> () const |
Dereferencing of this pointer yields the underlying peak. More... | |
CoordinateType | getRT () const |
returns the retention time of the current scan More... | |
CoordinateType | getDriftTime () const |
returns the ion mobility time of the current scan More... | |
const SpectrumT & | getSpectrum () const |
returns the current scan into which the iterator points More... | |
PeakIndex | getPeakIndex () const |
returns the PeakIndex corresponding to the current iterator position More... | |
void | nextScan_ () |
advances the iterator to the next valid peak in the next valid spectrum More... | |
Forward iterator for an area of peaks in an experiment.
This iterator allows us to move through the data structure in a linear manner i.e. we don't need to jump to the next spectrum manually.
Ion mobility can also be filtered for: the low/high range for IM are used to skip over spectra in the given RT range whose drift time is not within the given range. I.e. the RT range could contain multiple IM frames.
typedef double CoordinateType |
typedef unsigned int difference_type |
The difference type.
typedef std::forward_iterator_tag iterator_category |
The iterator's category type.
typedef PeakIteratorT PeakIteratorType |
typedef ValueT PeakType |
typedef PointerT pointer |
The pointer type as returned by operator->()
typedef ReferenceT reference |
The reference type as returned by operator*()
typedef SpectrumIteratorT SpectrumIteratorType |
using SpectrumT = typename std::iterator_traits<SpectrumIteratorType>::value_type |
typedef ValueT value_type |
The iterator's value type.
|
inlineexplicit |
Constructor for the begin iterator.
References AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::nextScan_().
|
inline |
Default constructor (for the end iterator)
|
default |
Destructor.
|
default |
Copy constructor.
|
inline |
returns the ion mobility time of the current scan
References AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::Param::current_scan_, and AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::p_.
Referenced by DimIM::map().
|
inline |
returns the PeakIndex corresponding to the current iterator position
References AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::Param::current_peak_, AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::Param::current_scan_, AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::Param::first_, AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::Param::is_end_, and AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::p_.
|
inline |
returns the retention time of the current scan
References AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::Param::current_scan_, and AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::p_.
Referenced by DimRT::map().
|
inline |
returns the current scan into which the iterator points
References AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::Param::current_scan_, and AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::p_.
|
inlineprivate |
advances the iterator to the next valid peak in the next valid spectrum
References AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::Param::current_peak_, AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::Param::current_scan_, AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::Param::end_peak_, AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::Param::end_scan_, AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::Param::high_im_, AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::Param::high_mz_, AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::Param::is_end_, AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::Param::low_im_, AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::Param::low_mz_, AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::Param::ms_level_, and AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::p_.
Referenced by AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::AreaIterator(), and AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::operator++().
|
inline |
Test for inequality.
|
inline |
Dereferencing of this pointer yields the underlying peak.
References AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::Param::current_peak_, and AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::p_.
|
inline |
Step forward by one (prefix operator)
References AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::Param::current_peak_, AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::Param::current_scan_, AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::Param::end_peak_, AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::Param::is_end_, AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::nextScan_(), and AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::p_.
|
inline |
Step forward by one (postfix operator)
|
inline |
Dereferencing of this pointer yields the underlying peak.
References AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::Param::current_peak_, and AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::p_.
|
inline |
|
inline |
Test for equality.
References AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::Param::current_peak_, AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::Param::is_end_, and AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::p_.
|
private |
holds spectra iterators and area limits
Referenced by AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::getDriftTime(), AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::getPeakIndex(), AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::getRT(), AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::getSpectrum(), AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::nextScan_(), AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::operator*(), AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::operator++(), AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::operator->(), AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::operator=(), and AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::operator==().