| OpenMS 2.5.0

Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
RangeManager< D > Class Template Referenceabstract

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

Note
  The range values are not updated automatically. Call updateRanges() to update the values!

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...

## Detailed Description

### template<UInt D>
class OpenMS::RangeManager< D >

Handles the management of a position and intensity range.

This is needed for all peak and feature container like Spectrum, MSExperiment and FeatureMap.

## Member Typedef Documentation

## ◆ IntensityRangeType

typedef DRange<1> IntensityRangeType

Intensity range type.

## ◆ PositionRangeType

typedef DRange<D> PositionRangeType

Position range type.

## ◆ PositionType

typedef DPosition<D> PositionType

Position Type.

## Member Enumeration Documentation

## ◆ anonymous enum

anonymous enum

Dimension of the position range.

Enumerator
DIMENSION |

## Constructor & Destructor Documentation

## ◆ RangeManager() [1/3]

RangeManager | ( |  | ) |

inline

Default constructor.

## ◆ RangeManager() [2/3]

RangeManager | ( | const RangeManager< D > & | rhs | ) |

inline

Copy constructor.

## ◆ RangeManager() [3/3]

RangeManager | ( | RangeManager< D > && |  | ) |

default noexcept

Move constructor.

## ◆ ~RangeManager()

virtual ~RangeManager | ( |  | ) |

inline virtual

Destructor.

## Member Function Documentation

## ◆ clearRanges()

void clearRanges | ( |  | ) |

inline

Resets the ranges.

## ◆ getMax()

const PositionType& getMax | ( |  | ) | const

inline

Returns the maximum position.

## ◆ getMaxInt()

double getMaxInt | ( |  | ) | const

inline

Returns the maximum intensity.

## ◆ getMin()

const PositionType& getMin | ( |  | ) | const

inline

Returns the minimum position.

## ◆ getMinInt()

double getMinInt | ( |  | ) | const

inline

Returns the minimum intensity.

## ◆ operator!=()

bool operator!= | ( | const RangeManager< D > & | rhs | ) | const

inline

Equality operator.

## ◆ operator=()

RangeManager& operator= | ( | const RangeManager< D > & | rhs | ) |

inline

Assignment operator.

## ◆ operator==()

bool operator== | ( | const RangeManager< D > & | rhs | ) | const

inline

Equality operator.

Referenced by RangeManager< 2 >::operator!=().

## ◆ updateRanges()

virtual void updateRanges | ( |  | ) |

pure virtual

Updates minimum and maximum position/intensity.

This method is usually implemented by calling clearRanges() and updateRanges_().

Implemented in MSExperiment, ConsensusMap, FeatureMap, MSSpectrum, and MSChromatogram.

## ◆ updateRanges_()

void updateRanges_ | ( | const PeakIteratorType & | begin,
|  | const PeakIteratorType & | end
| ) |  |

inline protected

Updates the range using data points in the iterator range.

## Member Data Documentation

## ◆ int_range_

IntensityRangeType int_range_

protected

Intensity range (1-dimensional)

Referenced by RangeManager< 2 >::clearRanges(), RangeManager< 2 >::getMaxInt(), RangeManager< 2 >::getMinInt(), RangeManager< 2 >::operator=(), RangeManager< 2 >::operator==(), and RangeManager< 2 >::updateRanges_().

## ◆ pos_range_

PositionRangeType pos_range_

protected

Position range (D-dimensional)

Referenced by RangeManager< 2 >::clearRanges(), RangeManager< 2 >::getMax(), RangeManager< 2 >::getMin(), RangeManager< 2 >::operator=(), RangeManager< 2 >::operator==(), and RangeManager< 2 >::updateRanges_().