OpenMS
2.7.0
|
Handles the management of a position and intensity range. More...
#include <OpenMS/KERNEL/RangeManager.h>
Public Types | |
enum | { DIMENSION = D } |
Dimension of the position range. More... | |
typedef DRange< D > | PositionRangeType |
Position range type. More... | |
typedef DPosition< D > | PositionType |
Position Type. More... | |
typedef DRange< 1 > | IntensityRangeType |
Intensity range type. More... | |
Public Member Functions | |
RangeManager () | |
Default constructor. More... | |
RangeManager (const RangeManager &rhs) | |
Copy constructor. More... | |
RangeManager (RangeManager &&) noexcept=default | |
Move constructor. More... | |
virtual | ~RangeManager () |
Destructor. More... | |
RangeManager & | operator= (const RangeManager &rhs) |
Assignment operator. More... | |
bool | operator== (const RangeManager &rhs) const |
Equality operator. More... | |
bool | operator!= (const RangeManager &rhs) const |
Equality operator. More... | |
Range methods | |
| |
const PositionType & | getMin () const |
Returns the minimum position. More... | |
const PositionType & | getMax () const |
Returns the maximum position. More... | |
double | getMinInt () const |
Returns the minimum intensity. More... | |
double | getMaxInt () const |
Returns the maximum intensity. More... | |
virtual void | updateRanges ()=0 |
Updates minimum and maximum position/intensity. More... | |
void | clearRanges () |
Resets the ranges. More... | |
Protected Member Functions | |
template<class PeakIteratorType > | |
void | updateRanges_ (const PeakIteratorType &begin, const PeakIteratorType &end) |
Updates the range using data points in the iterator range. More... | |
Protected Attributes | |
IntensityRangeType | int_range_ |
Intensity range (1-dimensional) More... | |
PositionRangeType | pos_range_ |
Position range (D-dimensional) More... | |
Handles the management of a position and intensity range.
This is needed for all peak and feature container like Spectrum, MSExperiment and FeatureMap.
typedef DRange<1> IntensityRangeType |
Intensity range type.
typedef DRange<D> PositionRangeType |
Position range type.
typedef DPosition<D> PositionType |
Position Type.
|
inline |
Default constructor.
|
inline |
Copy constructor.
|
defaultnoexcept |
Move constructor.
|
inlinevirtual |
Destructor.
|
inline |
Resets the ranges.
References DIntervalBase< D >::empty, RangeManager< D >::int_range_, and RangeManager< D >::pos_range_.
|
inline |
Returns the maximum position.
References RangeManager< D >::pos_range_.
|
inline |
Returns the maximum intensity.
References RangeManager< D >::int_range_, and DIntervalBase< D >::maxPosition().
|
inline |
Returns the minimum position.
References RangeManager< D >::pos_range_.
|
inline |
Returns the minimum intensity.
References RangeManager< D >::int_range_, and DIntervalBase< D >::minPosition().
|
inline |
Equality operator.
References RangeManager< D >::operator==().
|
inline |
Assignment operator.
References RangeManager< D >::int_range_, and RangeManager< D >::pos_range_.
|
inline |
Equality operator.
References RangeManager< D >::int_range_, and RangeManager< D >::pos_range_.
Referenced by RangeManager< D >::operator!=().
|
pure virtual |
Updates minimum and maximum position/intensity.
This method is usually implemented by calling clearRanges() and updateRanges_().
Implemented in MSSpectrum, MSExperiment, MSChromatogram, FeatureMap, and ConsensusMap.
|
inlineprotected |
Updates the range using data points in the iterator range.
References RangeManager< D >::int_range_, DIntervalBase< D >::maxPosition(), DIntervalBase< D >::minPosition(), RangeManager< D >::pos_range_, DIntervalBase< D >::setMaxX(), and DIntervalBase< D >::setMinX().
|
protected |
Intensity range (1-dimensional)
Referenced by RangeManager< D >::clearRanges(), RangeManager< D >::getMaxInt(), RangeManager< D >::getMinInt(), RangeManager< D >::operator=(), RangeManager< D >::operator==(), and RangeManager< D >::updateRanges_().
|
protected |
Position range (D-dimensional)
Referenced by RangeManager< D >::clearRanges(), RangeManager< D >::getMax(), RangeManager< D >::getMin(), RangeManager< D >::operator=(), RangeManager< D >::operator==(), and RangeManager< D >::updateRanges_().