Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages

RangeManager Class Template Reference

#include <OpenMS/KERNEL/RangeManager.h>

List of all members.


Detailed Description

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

Handles the managment of a position and intensity range.

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

Public Types

enum  { DIMENSION = D }
 Dimension of the position range. More...
typedef DRange< D > PositionRangeType
 Position range type.
typedef DPosition< D > PositionType
 Position Type.
typedef DRange< 1 > IntensityRangeType
 Intensity range type.
typedef DoubleReal IntensityType
 Intensity Type.

Public Member Functions

 RangeManager ()
 Default constructor.
 RangeManager (const RangeManager &rhs)
 Copy constructor.
virtual ~RangeManager ()
 Destructor.
RangeManageroperator= (const RangeManager &rhs)
 Assignment operator.
bool operator== (const RangeManager &rhs) const
 Equality operator.
bool operator!= (const RangeManager &rhs) const
 Equality operator.
Range methods
Note:
The range values are not updated automatically. Call updateRanges() to update the values!


const PositionTypegetMin () const
 Returns the minimum position.
const PositionTypegetMax () const
 Returns the maximum position.
const IntensityType getMinInt () const
 Returns the minimum intensity.
const IntensityType getMaxInt () const
 Returns the maximum intensity.
virtual void updateRanges ()=0
 Updates minimum and maximum position/intensity.
void clearRanges ()
 Resets the ranges.

Protected Member Functions

template<class PeakIteratorType>
void updateRanges_ (const PeakIteratorType &begin, const PeakIteratorType &end)
 Updates the range using DPeak or 2D-dimensional data points in the iterator range.

Protected Attributes

IntensityRangeType int_range_
 Intensity range (1-dimensional).
PositionRangeType pos_range_
 Position range (D-dimensional).


Member Typedef Documentation

typedef DRange<D> PositionRangeType

Position range type.

typedef DPosition<D> PositionType

Position Type.

typedef DRange<1> IntensityRangeType

Intensity range type.

typedef DoubleReal IntensityType

Intensity Type.

Reimplemented in MSExperiment, and MSExperiment< OpenMS::PickedPeak1D >.


Member Enumeration Documentation

anonymous enum

Dimension of the position range.

Enumerator:
DIMENSION 


Constructor & Destructor Documentation

RangeManager (  )  [inline]

Default constructor.

RangeManager ( const RangeManager< D > &  rhs  )  [inline]

Copy constructor.

virtual ~RangeManager (  )  [inline, virtual]

Destructor.


Member Function Documentation

RangeManager& operator= ( const RangeManager< D > &  rhs  )  [inline]

Assignment operator.

bool operator== ( const RangeManager< D > &  rhs  )  const [inline]

Equality operator.

bool operator!= ( const RangeManager< D > &  rhs  )  const [inline]

Equality operator.

const PositionType& getMin (  )  const [inline]

Returns the minimum position.

const PositionType& getMax (  )  const [inline]

Returns the maximum position.

const IntensityType getMinInt (  )  const [inline]

Returns the minimum intensity.

const IntensityType getMaxInt (  )  const [inline]

Returns the maximum intensity.

virtual void updateRanges (  )  [pure virtual]

Updates minimum and maximum position/intensity.

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

Implemented in DSpectrum, FeatureMap, MSExperiment, DSpectrum< OpenMS::DPeakArray< PeakT, AllocT > >, FeatureMap< OpenMS::Feature >, and MSExperiment< OpenMS::PickedPeak1D >.

void clearRanges (  )  [inline]

Resets the ranges.

void updateRanges_ ( const PeakIteratorType &  begin,
const PeakIteratorType &  end 
) [inline, protected]

Updates the range using DPeak or 2D-dimensional data points in the iterator range.


Member Data Documentation

IntensityRangeType int_range_ [protected]

Intensity range (1-dimensional).

PositionRangeType pos_range_ [protected]

Position range (D-dimensional).


The documentation for this class was generated from the following file:
Generated Tue Apr 1 15:36:46 2008 -- using doxygen 1.5.4 OpenMS / TOPP 1.1