OpenMS
MobilityPeak1D Class Reference

A 1-dimensional raw data mobility point or peak. The unit (ms, 1/K_0, etc) is implicit. More...

#include <OpenMS/KERNEL/MobilityPeak1D.h>

Collaboration diagram for MobilityPeak1D:
[legend]

Classes

struct  IntensityLess
 
struct  MobilityLess
 Comparator by mobility position. More...
 
struct  PositionLess
 Comparator by position. As this class has dimension 1, this is basically an alias for MobilityLess. More...
 

Public Types

Type definitions

Dimension

enum  { DIMENSION = 1 }
 
using IntensityType = float
 Intensity type. More...
 
using PositionType = DPosition< 1 >
 Position type. More...
 
using CoordinateType = double
 Coordinate type. More...
 

Public Member Functions

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

Default constructor

 MobilityPeak1D ()=default
 
 MobilityPeak1D (PositionType a, IntensityType b)
 construct with position and intensity More...
 
 MobilityPeak1D (const MobilityPeak1D &p)=default
 Copy constructor. More...
 
 MobilityPeak1D (MobilityPeak1D &&) noexcept=default
 
MobilityPeak1Doperator= (const MobilityPeak1D &rhs)=default
 Assignment operator. More...
 
MobilityPeak1Doperator= (MobilityPeak1D &&) noexcept=default
 Move assignment operator. More...
 
 ~MobilityPeak1D () noexcept=default
 Destructor. More...
 
Accessors
IntensityType getIntensity () const
 
void setIntensity (IntensityType intensity)
 Mutable access to the data point intensity (height) More...
 
CoordinateType getMobility () const
 Non-mutable access to m/z. More...
 
void setMobility (CoordinateType mobility)
 Mutable access to mobility. More...
 
CoordinateType getPos () const
 Alias for getMobility() More...
 
void setPos (CoordinateType pos)
 Alias for setMobility() More...
 
PositionType const & getPosition () const
 Non-mutable access to the position. More...
 
PositionTypegetPosition ()
 Mutable access to the position. More...
 
void setPosition (PositionType const &position)
 Mutable access to the position. More...
 

Protected Attributes

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

Detailed Description

A 1-dimensional raw data mobility point or peak. The unit (ms, 1/K_0, etc) is implicit.

This data structure is intended for continuous mobility data or centroided mobility data.

Member Typedef Documentation

◆ CoordinateType

using CoordinateType = double

Coordinate type.

◆ IntensityType

using IntensityType = float

Intensity type.

◆ PositionType

using PositionType = DPosition<1>

Position type.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
DIMENSION 

Constructor & Destructor Documentation

◆ MobilityPeak1D() [1/4]

MobilityPeak1D ( )
default

◆ MobilityPeak1D() [2/4]

MobilityPeak1D ( PositionType  a,
IntensityType  b 
)
inline

construct with position and intensity

◆ MobilityPeak1D() [3/4]

MobilityPeak1D ( const MobilityPeak1D p)
default

Copy constructor.

◆ MobilityPeak1D() [4/4]

MobilityPeak1D ( MobilityPeak1D &&  )
defaultnoexcept

◆ ~MobilityPeak1D()

~MobilityPeak1D ( )
defaultnoexcept

Destructor.

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

Member Function Documentation

◆ getIntensity()

IntensityType getIntensity ( ) const
inline

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

Referenced by DimINT::map(), and MobilityPeak1D::IntensityLess::operator()().

◆ getMobility()

CoordinateType getMobility ( ) const
inline

Non-mutable access to m/z.

Referenced by DimIM::map(), and MobilityPeak1D::MobilityLess::operator()().

◆ getPos()

CoordinateType getPos ( ) const
inline

Alias for getMobility()

◆ 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 MobilityPeak1D::PositionLess::operator()().

◆ operator!=()

bool operator!= ( const MobilityPeak1D rhs) const
inline

Equality operator.

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

◆ operator=() [1/2]

MobilityPeak1D& operator= ( const MobilityPeak1D rhs)
default

Assignment operator.

◆ operator=() [2/2]

MobilityPeak1D& operator= ( MobilityPeak1D &&  )
defaultnoexcept

Move assignment operator.

◆ operator==()

bool operator== ( const MobilityPeak1D rhs) const
inline

Equality operator.

References MobilityPeak1D::intensity_, and MobilityPeak1D::position_.

◆ setIntensity()

void setIntensity ( IntensityType  intensity)
inline

Mutable access to the data point intensity (height)

Referenced by DimINT::fromXY().

◆ setMobility()

void setMobility ( CoordinateType  mobility)
inline

Mutable access to mobility.

Referenced by DimIM::fromXY().

◆ setPos()

void setPos ( CoordinateType  pos)
inline

Alias for setMobility()

◆ setPosition()

void setPosition ( PositionType const &  position)
inline

Mutable access to the position.

Member Data Documentation

◆ intensity_

IntensityType intensity_ = 0.0
protected

The data point intensity.

Referenced by MobilityPeak1D::operator==().

◆ position_

PositionType position_ {}
protected

The data point position.

Referenced by MobilityPeak1D::operator==().