OpenMS
MobilityPeak2D Class Reference

A 2-dimensional raw data point or peak. More...

#include <OpenMS/KERNEL/MobilityPeak2D.h>

Collaboration diagram for MobilityPeak2D:
[legend]

Classes

struct  IMLess
 Comparator by IM position. More...
 
struct  IntensityLess
 
struct  MZLess
 Comparator by m/z position. More...
 
struct  PositionLess
 Comparator by position. Lexicographical comparison (first IM then m/z) is done. More...
 

Public Types

Type definitions
typedef float IntensityType
 Intensity type. More...
 
typedef double CoordinateType
 Coordinate type (of the position) More...
 
typedef DPosition< 2 > PositionType
 Position type. More...
 

Public Member Functions

bool operator== (const MobilityPeak2D &rhs) const
 Equality operator. More...
 
bool operator!= (const MobilityPeak2D &rhs) const
 Equality operator. More...
 
Constructors and Destructor

Default constructor

 MobilityPeak2D ()=default
 
 MobilityPeak2D (const PositionType &pos, const IntensityType in)
 Member constructor. More...
 
 MobilityPeak2D (const MobilityPeak2D &p)=default
 Copy constructor. More...
 
 MobilityPeak2D (MobilityPeak2D &&) noexcept=default
 Move constructor. More...
 
MobilityPeak2Doperator= (const MobilityPeak2D &rhs)=default
 Assignment operator. More...
 
MobilityPeak2Doperator= (MobilityPeak2D &&) noexcept=default
 Move assignment operator. More...
 
 ~MobilityPeak2D () noexcept=default
 Destructor. More...
 
Accessors

Non-mutable access to the data point intensity (height)

IntensityType getIntensity () const
 
void setIntensity (IntensityType intensity)
 Sets data point intensity (height) More...
 
PositionType const & getPosition () const
 Non-mutable access to the position. More...
 
PositionTypegetPosition ()
 Mutable access to the position. More...
 
void setPosition (const PositionType &position)
 Mutable access to the position. More...
 
CoordinateType getMZ () const
 Returns the m/z coordinate (index 1) More...
 
void setMZ (CoordinateType coordinate)
 Mutable access to the m/z coordinate (index 1) More...
 
CoordinateType getMobility () const
 Returns the IM coordinate (index 0) More...
 
void setMobility (CoordinateType coordinate)
 Mutable access to the IM coordinate (index 0) More...
 

Protected Attributes

PositionType position_ {}
 The data point position. More...
 
IntensityType intensity_ {}
 The data point intensity. More...
 

Friends

std::ostream & operator<< (std::ostream &os, const MobilityPeak2D &point)
 Print the contents to a stream. More...
 

Dimension descriptions

enum  DimensionDescription { IM = 0 , MZ = 1 , DIMENSION = 2 }
 This enum maps the symbolic names of the dimensions to numbers. More...
 
static char const *const dimension_name_short_ [DIMENSION]
 Short name of the dimension (abbreviated form) More...
 
static char const *const dimension_name_full_ [DIMENSION]
 Full name of the dimension (self-explanatory form) More...
 
static char const *const dimension_unit_short_ [DIMENSION]
 Unit of measurement (abbreviated form) More...
 
static char const *const dimension_unit_full_ [DIMENSION]
 Unit of measurement (self-explanatory form) More...
 
static char const * shortDimensionName (UInt const dim)
 Short name of the dimension (abbreviated form) More...
 
static char const * shortDimensionNameIM ()
 Short name of the dimension (abbreviated form) More...
 
static char const * shortDimensionNameMZ ()
 Short name of the dimension (abbreviated form) More...
 
static char const * fullDimensionName (UInt const dim)
 Full name of the dimension (self-explanatory form) More...
 
static char const * fullDimensionNameIM ()
 Full name of the dimension (self-explanatory form) More...
 
static char const * fullDimensionNameMZ ()
 Full name of the dimension (self-explanatory form) More...
 
static char const * shortDimensionUnit (UInt const dim)
 Unit of measurement (abbreviated form) More...
 
static char const * shortDimensionUnitIM ()
 Unit of measurement (abbreviated form) More...
 
static char const * shortDimensionUnitMZ ()
 Unit of measurement (abbreviated form) More...
 
static char const * fullDimensionUnit (UInt const dim)
 Unit of measurement (self-explanatory form) More...
 
static char const * fullDimensionUnitIM ()
 Unit of measurement (self-explanatory form) More...
 
static char const * fullDimensionUnitMZ ()
 Unit of measurement (self-explanatory form) More...
 

Detailed Description

A 2-dimensional raw data point or peak.

This data structure is intended for continuous data or peak data. If you want to annotated single peaks with meta data, use RichMobilityPeak2D instead.

Member Typedef Documentation

◆ CoordinateType

typedef double CoordinateType

Coordinate type (of the position)

◆ IntensityType

typedef float IntensityType

Intensity type.

◆ PositionType

typedef DPosition<2> PositionType

Position type.

Member Enumeration Documentation

◆ DimensionDescription

This enum maps the symbolic names of the dimensions to numbers.

Enumerator
IM 

Ion Mobility dimension id (0 if used as a const int)

MZ 

Mass-to-charge dimension id (1 if used as a const int)

DIMENSION 

Number of dimensions.

Constructor & Destructor Documentation

◆ MobilityPeak2D() [1/4]

MobilityPeak2D ( )
default

◆ MobilityPeak2D() [2/4]

MobilityPeak2D ( const PositionType pos,
const IntensityType  in 
)
inlineexplicit

Member constructor.

◆ MobilityPeak2D() [3/4]

MobilityPeak2D ( const MobilityPeak2D p)
default

Copy constructor.

◆ MobilityPeak2D() [4/4]

MobilityPeak2D ( MobilityPeak2D &&  )
defaultnoexcept

Move constructor.

◆ ~MobilityPeak2D()

~MobilityPeak2D ( )
defaultnoexcept

Destructor.

Note
The destructor is non-virtual although many classes are derived from MobilityPeak2D. This is intentional, since otherwise we would "waste" space for a vtable pointer in each instance. Normally you should not derive other classes from MobilityPeak2D (unless you know what you are doing, of course).

Member Function Documentation

◆ fullDimensionName()

static char const* fullDimensionName ( UInt const  dim)
static

Full name of the dimension (self-explanatory form)

◆ fullDimensionNameIM()

static char const* fullDimensionNameIM ( )
static

Full name of the dimension (self-explanatory form)

◆ fullDimensionNameMZ()

static char const* fullDimensionNameMZ ( )
static

Full name of the dimension (self-explanatory form)

◆ fullDimensionUnit()

static char const* fullDimensionUnit ( UInt const  dim)
static

Unit of measurement (self-explanatory form)

◆ fullDimensionUnitIM()

static char const* fullDimensionUnitIM ( )
static

Unit of measurement (self-explanatory form)

◆ fullDimensionUnitMZ()

static char const* fullDimensionUnitMZ ( )
static

Unit of measurement (self-explanatory form)

◆ getIntensity()

IntensityType getIntensity ( ) const
inline

◆ getMobility()

CoordinateType getMobility ( ) const
inline

Returns the IM coordinate (index 0)

References OpenMS::IM.

Referenced by DimIM::map(), and MobilityPeak2D::IMLess::operator()().

◆ getMZ()

CoordinateType getMZ ( ) const
inline

Returns the m/z coordinate (index 1)

References OpenMS::MZ.

Referenced by DimMZ::map(), and MobilityPeak2D::MZLess::operator()().

◆ getPosition() [1/2]

PositionType& getPosition ( )
inline

Mutable access to the position.

◆ getPosition() [2/2]

PositionType const& getPosition ( ) const
inline

Non-mutable access to the position.

Referenced by MobilityPeak2D::PositionLess::operator()().

◆ operator!=()

bool operator!= ( const MobilityPeak2D rhs) const
inline

Equality operator.

References OpenMS::Internal::operator==().

◆ operator=() [1/2]

MobilityPeak2D& operator= ( const MobilityPeak2D rhs)
default

Assignment operator.

◆ operator=() [2/2]

MobilityPeak2D& operator= ( MobilityPeak2D &&  )
defaultnoexcept

Move assignment operator.

◆ operator==()

bool operator== ( const MobilityPeak2D rhs) const
inline

Equality operator.

References MobilityPeak2D::intensity_, and MobilityPeak2D::position_.

◆ setIntensity()

void setIntensity ( IntensityType  intensity)
inline

Sets data point intensity (height)

Referenced by DimINT::fromXY().

◆ setMobility()

void setMobility ( CoordinateType  coordinate)
inline

Mutable access to the IM coordinate (index 0)

References OpenMS::IM.

Referenced by DimIM::fromXY().

◆ setMZ()

void setMZ ( CoordinateType  coordinate)
inline

Mutable access to the m/z coordinate (index 1)

References OpenMS::MZ.

Referenced by DimMZ::fromXY().

◆ setPosition()

void setPosition ( const PositionType position)
inline

Mutable access to the position.

◆ shortDimensionName()

static char const* shortDimensionName ( UInt const  dim)
static

Short name of the dimension (abbreviated form)

◆ shortDimensionNameIM()

static char const* shortDimensionNameIM ( )
static

Short name of the dimension (abbreviated form)

◆ shortDimensionNameMZ()

static char const* shortDimensionNameMZ ( )
static

Short name of the dimension (abbreviated form)

◆ shortDimensionUnit()

static char const* shortDimensionUnit ( UInt const  dim)
static

Unit of measurement (abbreviated form)

◆ shortDimensionUnitIM()

static char const* shortDimensionUnitIM ( )
static

Unit of measurement (abbreviated form)

◆ shortDimensionUnitMZ()

static char const* shortDimensionUnitMZ ( )
static

Unit of measurement (abbreviated form)

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const MobilityPeak2D point 
)
friend

Print the contents to a stream.

Member Data Documentation

◆ dimension_name_full_

char const* const dimension_name_full_[DIMENSION]
staticprotected

Full name of the dimension (self-explanatory form)

◆ dimension_name_short_

char const* const dimension_name_short_[DIMENSION]
staticprotected

Short name of the dimension (abbreviated form)

◆ dimension_unit_full_

char const* const dimension_unit_full_[DIMENSION]
staticprotected

Unit of measurement (self-explanatory form)

◆ dimension_unit_short_

char const* const dimension_unit_short_[DIMENSION]
staticprotected

Unit of measurement (abbreviated form)

◆ intensity_

IntensityType intensity_ {}
protected

The data point intensity.

Referenced by MobilityPeak2D::operator==().

◆ position_

PositionType position_ {}
protected

The data point position.

Referenced by MobilityPeak2D::operator==().