183 for (
UInt i = 0; i < std::min(D, D2); ++i)
244 return *
this ==
empty;
401 os <<
"--DIntervalBase BEGIN--" << std::endl;
402 os <<
"MIN --> " << rhs.
minPosition() << std::endl;
403 os <<
"MAX --> " << rhs.
maxPosition() << std::endl;
404 os <<
"--DIntervalBase END--" << std::endl;
Representation of a coordinate in D-dimensional space.
Definition: DPosition.h:55
A base class for D-dimensional interval.
Definition: DIntervalBase.h:56
bool isEmpty(UInt dim) const
Is the dimension dim empty? If min==max, the interval is NOT empty!
Definition: DIntervalBase.h:248
void setDimMinMax(UInt dim, const DIntervalBase< 1 > &min_max)
only set interval for a single dimension
Definition: DIntervalBase.h:254
PositionType min_
lower left point
Definition: DIntervalBase.h:362
static DIntervalBase const zero
instance with all positions zero
Definition: DIntervalBase.h:286
PositionType::CoordinateType CoordinateType
Coordinate type of the positions.
Definition: DIntervalBase.h:68
CoordinateType minX() const
Accessor for min_ coordinate minimum.
Definition: DIntervalBase.h:294
PositionType const & maxPosition() const
Accessor to maximum position.
Definition: DIntervalBase.h:130
PositionType max_
upper right point
Definition: DIntervalBase.h:365
bool operator==(const DIntervalBase &rhs) const
Equality operator.
Definition: DIntervalBase.h:195
CoordinateType height() const
Returns the height of the area i.e. the difference of dimension one (Y).
Definition: DIntervalBase.h:352
void setMinY(CoordinateType const c)
Mutator for max_ coordinate of the smaller point.
Definition: DIntervalBase.h:325
DPosition< D > PositionType
Position type.
Definition: DIntervalBase.h:66
DIntervalBase(const DIntervalBase &rhs)
Copy constructor.
Definition: DIntervalBase.h:86
void setMin(PositionType const &position)
Mutator for minimum position.
Definition: DIntervalBase.h:141
CoordinateType width() const
Returns the width of the area i.e. the difference of dimension zero (X).
Definition: DIntervalBase.h:346
CoordinateType maxX() const
Accessor for min_ coordinate maximum.
Definition: DIntervalBase.h:306
void setMaxY(CoordinateType const c)
Mutator for max_ coordinate of the larger point.
Definition: DIntervalBase.h:339
@ DIMENSION
Definition: DIntervalBase.h:64
void assign(const DIntervalBase< D2 > rhs)
Assignment from a DIntervalBase of different dimensions.
Definition: DIntervalBase.h:181
void setMinMax(PositionType const &min, PositionType const &max)
Mutator for minimum and maximum position.
Definition: DIntervalBase.h:168
void setMax(PositionType const &position)
Mutator for maximum position.
Definition: DIntervalBase.h:156
CoordinateType maxY() const
Accessor for max_ coordinate maximum.
Definition: DIntervalBase.h:312
PositionType diagonal() const
Returns the diagonal of the area, i.e. max_ - min_.
Definition: DIntervalBase.h:278
PositionType center() const
Returns the center of the interval.
Definition: DIntervalBase.h:269
DIntervalBase(DIntervalBase &&) noexcept=default
Move constructor.
bool operator!=(const DIntervalBase &rhs) const
Equality operator.
Definition: DIntervalBase.h:201
void setMinX(CoordinateType const c)
Mutator for min_ coordinate of the smaller point.
Definition: DIntervalBase.h:318
DIntervalBase & operator-=(const PositionType &point)
Definition: DIntervalBase.h:227
DIntervalBase operator-(const PositionType &point) const
Definition: DIntervalBase.h:220
~DIntervalBase()
Destructor.
Definition: DIntervalBase.h:104
void normalize_()
normalization to keep all dimensions in the right geometrical order (min_[X] < max_[X])
Definition: DIntervalBase.h:368
void clear()
Make the interval empty.
Definition: DIntervalBase.h:235
DIntervalBase(const std::pair< PositionType, PositionType > &pair)
Protected constructor for the construction of static instances.
Definition: DIntervalBase.h:380
bool isEmpty() const
Definition: DIntervalBase.h:242
DIntervalBase()
Default constructor.
Definition: DIntervalBase.h:79
DIntervalBase & operator+=(const PositionType &point)
Definition: DIntervalBase.h:213
void setMaxX(CoordinateType const c)
Mutator for min_ coordinate of the larger point.
Definition: DIntervalBase.h:332
static DIntervalBase const empty
empty instance
Definition: DIntervalBase.h:284
DIntervalBase operator+(const PositionType &point) const
Definition: DIntervalBase.h:206
CoordinateType minY() const
Accessor for max_ coordinate minimum.
Definition: DIntervalBase.h:300
PositionType const & minPosition() const
Accessor to minimum position.
Definition: DIntervalBase.h:124
DIntervalBase(PositionType const &minimum, PositionType const &maximum)
This constructor sets min_ and max_ directly.
Definition: DIntervalBase.h:111
unsigned int UInt
Unsigned integer type.
Definition: Types.h:94
const double c
Definition: Constants.h:214
std::ostream & operator<<(std::ostream &os, const DIntervalBase< D > &rhs)
Print the contents to a stream.
Definition: DIntervalBase.h:399
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:48