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];
141 explicit Peak2D(
const PositionType& pos,
const IntensityType in) :
148 position_(p.position_),
149 intensity_(p.intensity_)
175 intensity_ = intensity;
193 position_ = position;
199 return position_[MZ];
203 void setMZ(CoordinateType coordinate)
205 position_[MZ] = coordinate;
211 return position_[RT];
215 void setRT(CoordinateType coordinate)
217 position_[RT] = coordinate;
225 if (
this == &rhs)
return *
this;
236 #pragma clang diagnostic push 237 #pragma clang diagnostic ignored "-Wfloat-equal" 239 #pragma clang diagnostic pop 256 std::binary_function<Peak2D, Peak2D, bool>
273 bool operator()(IntensityType left, IntensityType right)
const 282 std::binary_function<Peak2D, Peak2D, bool>
291 return left.
getRT() < right;
296 return left < right.
getRT();
299 bool operator()(CoordinateType left, CoordinateType right)
const 308 std::binary_function<Peak2D, Peak2D, bool>
317 return left.
getMZ() < right;
322 return left < right.
getMZ();
325 bool operator()(CoordinateType left, CoordinateType right)
const 334 public std::binary_function<Peak2D, Peak2D, bool>
351 bool operator()(
const PositionType & left,
const PositionType & right)
const 359 friend OPENMS_DLLAPI std::ostream &
operator<<(std::ostream & os,
const Peak2D & point);
370 OPENMS_DLLAPI std::ostream &
operator<<(std::ostream & os,
const Peak2D & point);
374 #endif // OPENMS_KERNEL_PEAK2D_H Peak2D(const PositionType &pos, const IntensityType in)
Member constructor.
Definition: Peak2D.h:141
bool operator()(const Peak2D &left, const Peak2D &right) const
Definition: Peak2D.h:310
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:203
DPosition< 2 > PositionType
Position type.
Definition: Peak2D.h:67
bool operator()(CoordinateType left, const Peak2D &right) const
Definition: Peak2D.h:320
unsigned int UInt
Unsigned integer type.
Definition: Types.h:95
bool operator()(IntensityType left, const Peak2D &right) const
Definition: Peak2D.h:268
bool operator()(const Peak2D &left, const Peak2D &right) const
Definition: Peak2D.h:258
bool operator()(const Peak2D &left, CoordinateType right) const
Definition: Peak2D.h:289
Peak2D & operator=(const Peak2D &rhs)
Assignment operator.
Definition: Peak2D.h:223
bool operator==(_Iterator< _Val, _Ref, _Ptr > const &, _Iterator< _Val, _Ref, _Ptr > const &)
Definition: KDTree.h:806
double CoordinateType
Coordinate type (of the position)
Definition: Peak2D.h:65
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
IntensityType getIntensity() const
Definition: Peak2D.h:167
bool operator()(const PositionType &left, const PositionType &right) const
Definition: Peak2D.h:351
void setIntensity(IntensityType intensity)
Non-mutable access to the data point intensity (height)
Definition: Peak2D.h:173
Peak2D()
Definition: Peak2D.h:135
Comparator by position. Lexicographical comparison (first RT then m/z) is done.
Definition: Peak2D.h:333
PositionType position_
The data point position.
Definition: Peak2D.h:364
bool operator()(const Peak2D &left, const Peak2D &right) const
Definition: Peak2D.h:336
void setRT(CoordinateType coordinate)
Mutable access to the RT coordinate (index 0)
Definition: Peak2D.h:215
DimensionDescription
This enum maps the symbolic names of the dimensions to numbers.
Definition: Peak2D.h:74
bool operator()(IntensityType left, IntensityType right) const
Definition: Peak2D.h:273
CoordinateType getMZ() const
Returns the m/z coordinate (index 1)
Definition: Peak2D.h:197
bool operator!=(const Peak2D &rhs) const
Equality operator.
Definition: Peak2D.h:243
std::ostream & operator<<(std::ostream &os, const AccurateMassSearchResult &amsr)
Peak2D(const Peak2D &p)
Copy constructor.
Definition: Peak2D.h:147
void setPosition(const PositionType &position)
Mutable access to the position.
Definition: Peak2D.h:191
float IntensityType
Intensity type.
Definition: Peak2D.h:63
bool operator()(CoordinateType left, CoordinateType right) const
Definition: Peak2D.h:325
~Peak2D()
Destructor.
Definition: Peak2D.h:160
Comparator by RT position.
Definition: Peak2D.h:281
CoordinateType getRT() const
Returns the RT coordinate (index 0)
Definition: Peak2D.h:209
bool operator()(const Peak2D &left, CoordinateType right) const
Definition: Peak2D.h:315
PositionType & getPosition()
Mutable access to the position.
Definition: Peak2D.h:185
bool operator()(CoordinateType left, const Peak2D &right) const
Definition: Peak2D.h:294
PositionType const & getPosition() const
Non-mutable access to the position.
Definition: Peak2D.h:179
bool operator()(const Peak2D &left, const Peak2D &right) const
Definition: Peak2D.h:284
bool operator()(const Peak2D &left, IntensityType right) const
Definition: Peak2D.h:263
bool operator()(const Peak2D &left, const PositionType &right) const
Definition: Peak2D.h:341
bool operator()(CoordinateType left, CoordinateType right) const
Definition: Peak2D.h:299
IntensityType intensity_
The data point intensity.
Definition: Peak2D.h:366
Comparator by m/z position.
Definition: Peak2D.h:307
bool operator()(const PositionType &left, const Peak2D &right) const
Definition: Peak2D.h:346
bool operator==(const Peak2D &rhs) const
Equality operator.
Definition: Peak2D.h:234