157 for (
UInt i = 0; i < std::min(D, D2); ++i)
218 return *
this ==
empty;
375 os <<
"--DIntervalBase BEGIN--" << std::endl;
376 os <<
"MIN --> " << rhs.
minPosition() << std::endl;
377 os <<
"MAX --> " << rhs.
maxPosition() << std::endl;
378 os <<
"--DIntervalBase END--" << std::endl;
Representation of a coordinate in D-dimensional space.
Definition: DPosition.h:29
A base class for D-dimensional interval.
Definition: DIntervalBase.h:30
bool isEmpty(UInt dim) const
Is the dimension dim empty? If min==max, the interval is NOT empty!
Definition: DIntervalBase.h:222
void setDimMinMax(UInt dim, const DIntervalBase< 1 > &min_max)
only set interval for a single dimension
Definition: DIntervalBase.h:228
PositionType min_
lower left point
Definition: DIntervalBase.h:336
static DIntervalBase const zero
instance with all positions zero
Definition: DIntervalBase.h:260
PositionType::CoordinateType CoordinateType
Coordinate type of the positions.
Definition: DIntervalBase.h:42
CoordinateType minX() const
Accessor for min_ coordinate minimum.
Definition: DIntervalBase.h:268
PositionType const & maxPosition() const
Accessor to maximum position.
Definition: DIntervalBase.h:104
PositionType max_
upper right point
Definition: DIntervalBase.h:339
bool operator==(const DIntervalBase &rhs) const
Equality operator.
Definition: DIntervalBase.h:169
CoordinateType height() const
Returns the height of the area i.e. the difference of dimension one (Y).
Definition: DIntervalBase.h:326
void setMinY(CoordinateType const c)
Mutator for max_ coordinate of the smaller point.
Definition: DIntervalBase.h:299
DPosition< D > PositionType
Position type.
Definition: DIntervalBase.h:40
DIntervalBase(const DIntervalBase &rhs)
Copy constructor.
Definition: DIntervalBase.h:60
void setMin(PositionType const &position)
Mutator for minimum position.
Definition: DIntervalBase.h:115
CoordinateType width() const
Returns the width of the area i.e. the difference of dimension zero (X).
Definition: DIntervalBase.h:320
CoordinateType maxX() const
Accessor for min_ coordinate maximum.
Definition: DIntervalBase.h:280
void setMaxY(CoordinateType const c)
Mutator for max_ coordinate of the larger point.
Definition: DIntervalBase.h:313
@ DIMENSION
Definition: DIntervalBase.h:38
void assign(const DIntervalBase< D2 > rhs)
Assignment from a DIntervalBase of different dimensions.
Definition: DIntervalBase.h:155
void setMinMax(PositionType const &min, PositionType const &max)
Mutator for minimum and maximum position.
Definition: DIntervalBase.h:142
void setMax(PositionType const &position)
Mutator for maximum position.
Definition: DIntervalBase.h:130
CoordinateType maxY() const
Accessor for max_ coordinate maximum.
Definition: DIntervalBase.h:286
PositionType diagonal() const
Returns the diagonal of the area, i.e. max_ - min_.
Definition: DIntervalBase.h:252
PositionType center() const
Returns the center of the interval.
Definition: DIntervalBase.h:243
DIntervalBase(DIntervalBase &&) noexcept=default
Move constructor.
bool operator!=(const DIntervalBase &rhs) const
Equality operator.
Definition: DIntervalBase.h:175
void setMinX(CoordinateType const c)
Mutator for min_ coordinate of the smaller point.
Definition: DIntervalBase.h:292
DIntervalBase & operator-=(const PositionType &point)
Definition: DIntervalBase.h:201
DIntervalBase operator-(const PositionType &point) const
Definition: DIntervalBase.h:194
~DIntervalBase()
Destructor.
Definition: DIntervalBase.h:78
void normalize_()
normalization to keep all dimensions in the right geometrical order (min_[X] < max_[X])
Definition: DIntervalBase.h:342
void clear()
Make the interval empty.
Definition: DIntervalBase.h:209
DIntervalBase(const std::pair< PositionType, PositionType > &pair)
Protected constructor for the construction of static instances.
Definition: DIntervalBase.h:354
bool isEmpty() const
Definition: DIntervalBase.h:216
DIntervalBase()
Default constructor.
Definition: DIntervalBase.h:53
DIntervalBase & operator+=(const PositionType &point)
Definition: DIntervalBase.h:187
void setMaxX(CoordinateType const c)
Mutator for min_ coordinate of the larger point.
Definition: DIntervalBase.h:306
static DIntervalBase const empty
empty instance
Definition: DIntervalBase.h:258
DIntervalBase operator+(const PositionType &point) const
Definition: DIntervalBase.h:180
CoordinateType minY() const
Accessor for max_ coordinate minimum.
Definition: DIntervalBase.h:274
PositionType const & minPosition() const
Accessor to minimum position.
Definition: DIntervalBase.h:98
DIntervalBase(PositionType const &minimum, PositionType const &maximum)
This constructor sets min_ and max_ directly.
Definition: DIntervalBase.h:85
unsigned int UInt
Unsigned integer type.
Definition: Types.h:64
const double c
Definition: Constants.h:188
std::ostream & operator<<(std::ostream &os, const DIntervalBase< D > &rhs)
Print the contents to a stream.
Definition: DIntervalBase.h:373
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19