| OpenMS 2.5.0

Classes | Public Member Functions | Protected Attributes | List of all members
Peak1D Class Reference
Kernel

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

`#include <OpenMS/KERNEL/Peak1D.h>`

Inheritance diagram for Peak1D:

## Classes

struct | IntensityLess
struct | MZLess
| Comparator by m/z position. More...
struct | PositionLess
| Comparator by position. As this class has dimension 1, this is basically an alias for MZLess. More...

## Public Types

Type definitions
Dimension
enum | { DIMENSION = 1 }
typedef float | IntensityType
| Intensity type. More...
typedef DPosition< 1 > | PositionType
| Position type. More...
typedef double | CoordinateType
| Coordinate type. More...

## Public Member Functions

Peak1D & | operator= (const Peak1D &rhs)
| Assignment operator. More...
bool | operator== (const Peak1D &rhs) const
| Equality operator. More...
bool | operator!= (const Peak1D &rhs) const
| Equality operator. More...
Constructors and Destructor
Default constructor
| Peak1D ()
| Peak1D (PositionType a, IntensityType b)
| construct with position and intensity More...
| Peak1D (const Peak1D &p)
| Copy constructor. More...
| Peak1D (Peak1D &&) noexcept=default
| ~Peak1D ()
| Destructor. More...
Accessors
IntensityType | getIntensity () const
void | setIntensity (IntensityType intensity)
| Mutable access to the data point intensity (height) More...
CoordinateType | getMZ () const
| Non-mutable access to m/z. More...
void | setMZ (CoordinateType mz)
| Mutable access to m/z. More...
CoordinateType | getPos () const
| Alias for getMZ() More...
void | setPos (CoordinateType pos)
| Alias for setMZ() More...
PositionType const & | getPosition () const
| Non-mutable access to the position. More...
PositionType & | getPosition ()
| 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_
| The data point intensity. More...

## Detailed Description

A 1-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 RichPeak1D instead.

## Member Typedef Documentation

## ◆ CoordinateType

typedef double CoordinateType

Coordinate type.

## ◆ IntensityType

typedef float IntensityType

Intensity type.

## ◆ PositionType

typedef DPosition<1> PositionType

Position type.

## Member Enumeration Documentation

## ◆ anonymous enum

anonymous enum

Enumerator
DIMENSION |

## Constructor & Destructor Documentation

## ◆ Peak1D() [1/4]

Peak1D | ( |  | ) |

inline

## ◆ Peak1D() [2/4]

Peak1D | ( | PositionType | a,
|  | IntensityType | b
| ) |  |

inline

construct with position and intensity

## ◆ Peak1D() [3/4]

Peak1D | ( | const Peak1D & | p | ) |

inline

Copy constructor.

## ◆ Peak1D() [4/4]

Peak1D | ( | Peak1D && |  | ) |

default noexcept

## ◆ ~Peak1D()

~Peak1D | ( |  | ) |

inline

Destructor.

Note
  The destructor is non-virtual although many classes are derived from Peak1D. This is intentional, since otherwise we would "waste" space for a vtable pointer in each instance. Normally you should not derive other classes from Peak1D (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 DTA2DFile::load(), Peak1D::IntensityLess::operator()(), and MetaProSIPReporting::plotFilteredSpectra().

## ◆ getMZ()

CoordinateType getMZ | ( |  | ) | const

inline

Non-mutable access to m/z.

Referenced by NucleicAcidSearchEngine::deisotopeAndSingleChargeMSSpectrum_(), DTA2DFile::load(), TOPPGNPSExport::main_(), Peak1D::MZLess::operator()(), MetaProSIPReporting::plotFilteredSpectra(), and DTAFile::store().

## ◆ getPos()

CoordinateType getPos | ( |  | ) | const

inline

Alias for getMZ()

## ◆ getPosition() [1/2]

PositionType const& getPosition | ( |  | ) | const

inline

Non-mutable access to the position.

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

## ◆ getPosition() [2/2]

PositionType& getPosition | ( |  | ) |

inline

Mutable access to the position.

## ◆ operator!=()

bool operator!= | ( | const Peak1D & | rhs | ) | const

inline

Equality operator.

References KDTree::operator==().

## ◆ operator=()

Peak1D& operator= | ( | const Peak1D & | rhs | ) |

inline

Assignment operator.

References Peak1D::intensity_, and Peak1D::position_.

## ◆ operator==()

bool operator== | ( | const Peak1D & | rhs | ) | const

inline

Equality operator.

References Peak1D::intensity_, and Peak1D::position_.

## ◆ setIntensity()

void setIntensity | ( | IntensityType | intensity | ) |

inline

Mutable access to the data point intensity (height)

Referenced by SpectraMerger::averageCentroidSpectra_(), SpectraMerger::averageProfileSpectra_(), MetaProSIPDecomposition::calculateDecompositionWeightsIsotopicPatterns(), MascotGenericFile::getNextSpectrum_(), MS2File::load(), DTAFile::load(), MascotInfile::load(), XMassFile::load(), DTA2DFile::load(), PeakPickerSH::pick(), PeakPickerIterative::pick(), and EmgScoring::prepareFit_().

## ◆ setMZ()

void setMZ | ( | CoordinateType | mz | ) |

inline

Mutable access to m/z.

Referenced by SpectraMerger::averageCentroidSpectra_(), SpectraMerger::averageProfileSpectra_(), MetaProSIPDecomposition::calculateDecompositionWeightsIsotopicPatterns(), NucleicAcidSearchEngine::deisotopeAndSingleChargeMSSpectrum_(), DTAFile::load(), DTA2DFile::load(), PeakPickerSH::pick(), PeakPickerIterative::pick(), EmgScoring::prepareFit_(), ChromatogramExtractor::prepareSpectra_(), ChromatogramExtractor::return_chromatogram(), and TOPPViewBase::showSpectrumGenerationDialog().

## ◆ setPos()

void setPos | ( | CoordinateType | pos | ) |

inline

Alias for setMZ()

## ◆ setPosition()

void setPosition | ( | PositionType const & | position | ) |

inline

Mutable access to the position.

References seqan::position().

Referenced by MascotGenericFile::getNextSpectrum_(), MS2File::load(), DTAFile::load(), MascotInfile::load(), and XMassFile::load().

## Member Data Documentation

## ◆ intensity_

IntensityType intensity_

protected

The data point intensity.

Referenced by Peak1D::operator=(), and Peak1D::operator==().

## ◆ position_

PositionType position_

protected

The data point position.

Referenced by Peak1D::operator=(), and Peak1D::operator==().