35 #ifndef OPENMS_KERNEL_RANGEMANAGER_H 36 #define OPENMS_KERNEL_RANGEMANAGER_H 79 if (
this == &rhs)
return *
this;
154 template <
class PeakIteratorType>
155 void updateRanges_(
const PeakIteratorType & begin,
const PeakIteratorType & end)
163 PositionType min = pos_range_.minPosition();
164 PositionType max = pos_range_.maxPosition();
169 for (PeakIteratorType it = begin; it != end; ++it)
172 for (
UInt i = 0; i < D; ++i)
174 double tmp = it->getPosition()[i];
186 double tmp = it->getIntensity();
197 pos_range_.setMin(min);
198 pos_range_.setMax(max);
207 #endif // OPENMS_KERNEL_DRANGE_H double getMinInt() const
Returns the minimum intensity.
Definition: RangeManager.h:121
void setMaxX(CoordinateType const c)
Mutator for min_ coordinate of the larger point.
Definition: DIntervalBase.h:279
DPosition< D > PositionType
Position Type.
Definition: RangeManager.h:56
PositionRangeType pos_range_
Position range (D-dimensional)
Definition: RangeManager.h:151
bool operator!=(const RangeManager &rhs) const
Equality operator.
Definition: RangeManager.h:95
bool operator==(const RangeManager &rhs) const
Equality operator.
Definition: RangeManager.h:88
double getMaxInt() const
Returns the maximum intensity.
Definition: RangeManager.h:127
unsigned int UInt
Unsigned integer type.
Definition: Types.h:95
const PositionType & getMax() const
Returns the maximum position.
Definition: RangeManager.h:115
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
DRange< D > PositionRangeType
Position range type.
Definition: RangeManager.h:54
PositionType const & maxPosition() const
Accessor to maximum position.
Definition: DIntervalBase.h:128
const PositionType & getMin() const
Returns the minimum position.
Definition: RangeManager.h:109
DRange< 1 > IntensityRangeType
Intensity range type.
Definition: RangeManager.h:58
RangeManager & operator=(const RangeManager &rhs)
Assignment operator.
Definition: RangeManager.h:77
void clearRanges()
Resets the ranges.
Definition: RangeManager.h:140
IntensityRangeType int_range_
Intensity range (1-dimensional)
Definition: RangeManager.h:149
A D-dimensional half-open interval.
Definition: DRange.h:61
RangeManager(const RangeManager &rhs)
Copy constructor.
Definition: RangeManager.h:67
void setMinX(CoordinateType const c)
Mutator for min_ coordinate of the smaller point.
Definition: DIntervalBase.h:265
void updateRanges_(const PeakIteratorType &begin, const PeakIteratorType &end)
Updates the range using data points in the iterator range.
Definition: RangeManager.h:155
Handles the management of a position and intensity range.
Definition: RangeManager.h:48
virtual ~RangeManager()
Destructor.
Definition: RangeManager.h:73
static DIntervalBase const empty
empty instance
Definition: DIntervalBase.h:231
virtual void updateRanges()=0
Updates minimum and maximum position/intensity.
Definition: RangeManager.h:52
RangeManager()
Default constructor.
Definition: RangeManager.h:61
PositionType const & minPosition() const
Accessor to minimum position.
Definition: DIntervalBase.h:122