35 #ifndef OPENMS_KERNEL_PEAK2D_H
36 #define OPENMS_KERNEL_PEAK2D_H
82 static char const * shortDimensionName(
UInt const dim);
84 static char const * shortDimensionNameRT();
86 static char const * shortDimensionNameMZ();
89 static char const * fullDimensionName(
UInt const dim);
91 static char const * fullDimensionNameRT();
93 static char const * fullDimensionNameMZ();
96 static char const * shortDimensionUnit(
UInt const dim);
98 static char const * shortDimensionUnitRT();
100 static char const * shortDimensionUnitMZ();
103 static char const * fullDimensionUnit(
UInt const dim);
105 static char const * fullDimensionUnitRT();
107 static char const * fullDimensionUnitMZ();
117 static char const *
const dimension_name_short_[DIMENSION];
120 static char const *
const dimension_name_full_[DIMENSION];
123 static char const *
const dimension_unit_short_[DIMENSION];
126 static char const *
const dimension_unit_full_[DIMENSION];
142 position_(p.position_),
143 intensity_(p.intensity_)
169 intensity_ = intensity;
187 position_ = position;
193 return position_[MZ];
199 position_[MZ] = coordinate;
205 return position_[RT];
211 position_[RT] = coordinate;
219 if (
this == &rhs)
return *
this;
230 #pragma clang diagnostic push
231 #pragma clang diagnostic ignored "-Wfloat-equal"
233 #pragma clang diagnostic pop
239 return !(operator==(rhs));
250 std::binary_function<Peak2D, Peak2D, bool>
276 std::binary_function<Peak2D, Peak2D, bool>
285 return left.
getRT() < right;
290 return left < right.
getRT();
302 std::binary_function<Peak2D, Peak2D, bool>
311 return left.
getMZ() < right;
316 return left < right.
getMZ();
328 public std::binary_function<Peak2D, Peak2D, bool>
353 friend OPENMS_DLLAPI std::ostream &
operator<<(std::ostream & os,
const Peak2D & point);
364 OPENMS_DLLAPI std::ostream &
operator<<(std::ostream & os,
const Peak2D & point);
368 #endif // OPENMS_KERNEL_PEAK2D_H
bool operator()(const Peak2D &left, const Peak2D &right) const
Definition: Peak2D.h:252
PositionType const & getPosition() const
Non-mutable access to the position.
Definition: Peak2D.h:173
bool operator()(const Peak2D &left, CoordinateType right) const
Definition: Peak2D.h:309
bool operator()(const Peak2D &left, CoordinateType right) const
Definition: Peak2D.h:283
A 2-dimensional raw data point or peak.
Definition: Peak2D.h:55
void setMZ(CoordinateType coordinate)
Mutable access to the m/z coordinate (index 1)
Definition: Peak2D.h:197
DPosition< 2 > PositionType
Position type.
Definition: Peak2D.h:67
bool operator()(const PositionType &left, const PositionType &right) const
Definition: Peak2D.h:345
bool operator()(const PositionType &left, const Peak2D &right) const
Definition: Peak2D.h:340
IntensityType getIntensity() const
Definition: Peak2D.h:161
bool operator()(CoordinateType left, CoordinateType right) const
Definition: Peak2D.h:293
Peak2D & operator=(const Peak2D &rhs)
Assignment operator.
Definition: Peak2D.h:217
double CoordinateType
Coordinate type (of the position)
Definition: Peak2D.h:65
CoordinateType getRT() const
Returns the RT coordinate (index 0)
Definition: Peak2D.h:203
void setIntensity(IntensityType intensity)
Non-mutable access to the data point intensity (height)
Definition: Peak2D.h:167
Peak2D()
Definition: Peak2D.h:135
Comparator by position. Lexicographical comparison (first RT then m/z) is done.
Definition: Peak2D.h:327
PositionType position_
The data point position.
Definition: Peak2D.h:358
bool operator==(const Peak2D &rhs) const
Equality operator.
Definition: Peak2D.h:228
void setRT(CoordinateType coordinate)
Mutable access to the RT coordinate (index 0)
Definition: Peak2D.h:209
DimensionDescription
This enum maps the symbolic names of the dimensions to numbers.
Definition: Peak2D.h:74
bool operator()(CoordinateType left, const Peak2D &right) const
Definition: Peak2D.h:288
bool operator()(CoordinateType left, const Peak2D &right) const
Definition: Peak2D.h:314
bool operator!=(const Peak2D &rhs) const
Equality operator.
Definition: Peak2D.h:237
std::ostream & operator<<(std::ostream &os, const AccurateMassSearchResult &amsr)
Peak2D(const Peak2D &p)
Copy constructor.
Definition: Peak2D.h:141
Comparator that allows to compare the indices of two peaks by their intensity.
Definition: FeaFiModule.h:56
void setPosition(const PositionType &position)
Mutable access to the position.
Definition: Peak2D.h:185
float IntensityType
Intensity type.
Definition: Peak2D.h:63
~Peak2D()
Destructor.
Definition: Peak2D.h:154
Comparator by RT position.
Definition: Peak2D.h:275
CoordinateType getMZ() const
Returns the m/z coordinate (index 1)
Definition: Peak2D.h:191
bool operator()(const Peak2D &left, IntensityType right) const
Definition: Peak2D.h:257
bool operator()(const Peak2D &left, const Peak2D &right) const
Definition: Peak2D.h:304
PositionType & getPosition()
Mutable access to the position.
Definition: Peak2D.h:179
bool operator()(const Peak2D &left, const Peak2D &right) const
Definition: Peak2D.h:278
bool operator()(IntensityType left, const Peak2D &right) const
Definition: Peak2D.h:262
bool operator()(IntensityType left, IntensityType right) const
Definition: Peak2D.h:267
bool operator()(const Peak2D &left, const PositionType &right) const
Definition: Peak2D.h:335
bool operator()(const Peak2D &left, const Peak2D &right) const
Definition: Peak2D.h:330
IntensityType intensity_
The data point intensity.
Definition: Peak2D.h:360
Comparator by m/z position.
Definition: Peak2D.h:301
bool operator()(CoordinateType left, CoordinateType right) const
Definition: Peak2D.h:319