| OpenMS 2.5.0

Public Member Functions | List of all members
OPXLDataStructs::XLPrecursorComparator Struct Reference

The XLPrecursorComparator is a comparator for XLPrecursors, that allows direct comparison of the XLPrecursor precursor mass with double numbers. More...

`#include <OpenMS/ANALYSIS/XLMS/OPXLDataStructs.h>`

## Public Member Functions

bool | operator() (const XLPrecursor &a, const XLPrecursor &b) const
bool | operator() (const XLPrecursor &a, const double &b) const
bool | operator() (const double &a, const XLPrecursor &b) const

## Detailed Description

The XLPrecursorComparator is a comparator for XLPrecursors, that allows direct comparison of the XLPrecursor precursor mass with double numbers.

This comparator can be used to sort a vector of XLPrecursors by precursor mass and to search for XLPrecursors with precursor masses within a double type mass range.

## Member Function Documentation

## ◆ operator()() [1/3]

bool operator() | ( | const XLPrecursor & | a,
|  | const XLPrecursor & | b
| ) |  | const

inline

References OPXLDataStructs::XLPrecursor::precursor_mass.

## ◆ operator()() [2/3]

bool operator() | ( | const XLPrecursor & | a,
|  | const double & | b
| ) |  | const

inline

References OPXLDataStructs::XLPrecursor::precursor_mass.

## ◆ operator()() [3/3]

bool operator() | ( | const double & | a,
|  | const XLPrecursor & | b
| ) |  | const

inline

References OPXLDataStructs::XLPrecursor::precursor_mass.