88 Base(minimum, maximum)
140 if (position[i] <
min_[i] || position[i] >
max_[i])
161 if (bounding_box.
min_[i] >
max_[i])
return false;
163 if (bounding_box.
max_[i] <
min_[i])
return false;
171 for (
UInt i = 0; i != D; i++)
193 os <<
"--DBOUNDINGBOX BEGIN--" << std::endl;
194 os <<
"MIN --> " << bounding_box.
minPosition() << std::endl;
195 os <<
"MAX --> " << bounding_box.
maxPosition() << std::endl;
196 os <<
"--DBOUNDINGBOX END--" << std::endl;
205 template<OpenMS::UInt D>
211 std::size_t seed = 0;
213 const auto& min_pos = bb.minPosition();
219 const auto& max_pos = bb.maxPosition();
A D-dimensional bounding box.
Definition DBoundingBox.h:30
PositionType min_
lower left point
Definition DIntervalBase.h:336
DBoundingBox()
Default constructor.
Definition DBoundingBox.h:56
DBoundingBox & operator=(const Base &rhs)
Assignment operator for the base class.
Definition DBoundingBox.h:75
bool encloses(const PositionType &position) const
Checks whether this range contains a certain point.
Definition DBoundingBox.h:136
Base::PositionType PositionType
Position type.
Definition DBoundingBox.h:43
DBoundingBox(const DBoundingBox &rhs)
Copy constructor.
Definition DBoundingBox.h:62
std::ostream & operator<<(std::ostream &os, const DBoundingBox< D > &bounding_box)
Print the contents to a stream.
Definition DBoundingBox.h:191
PositionType max_
upper right point
Definition DIntervalBase.h:339
bool encloses(CoordinateType x, CoordinateType y) const
2D-version encloses(x,y) is for convenience only
Definition DBoundingBox.h:149
bool operator==(const DBoundingBox &rhs) const
Equality operator.
Definition DBoundingBox.h:119
bool operator==(const Base &rhs) const
Equality operator.
Definition DBoundingBox.h:125
DBoundingBox(const PositionType &minimum, const PositionType &maximum)
Constructor from two positions.
Definition DBoundingBox.h:87
@ DIMENSION
Definition DBoundingBox.h:39
Internal::DIntervalBase< D > Base
Base class type.
Definition DBoundingBox.h:41
Base::CoordinateType CoordinateType
Coordinate type of the positions.
Definition DBoundingBox.h:45
void enlarge(CoordinateType x, CoordinateType y)
Enlarges the bounding box such that it contains a position specified by two coordinates.
Definition DBoundingBox.h:108
DBoundingBox & operator=(const DBoundingBox &rhs)
Assignment operator.
Definition DBoundingBox.h:68
bool intersects(const DBoundingBox &bounding_box) const
Definition DBoundingBox.h:157
bool isEmpty() const
Test if bounding box is empty.
Definition DBoundingBox.h:169
~DBoundingBox()
Destructor.
Definition DBoundingBox.h:82
void enlarge(const PositionType &p)
Enlarges the bounding box such that it contains a position.
Definition DBoundingBox.h:98
A base class for D-dimensional interval.
Definition DIntervalBase.h:30
PositionType min_
lower left point
Definition DIntervalBase.h:336
PositionType const & maxPosition() const
Accessor to maximum position.
Definition DIntervalBase.h:104
PositionType::CoordinateType CoordinateType
Coordinate type of the positions.
Definition DIntervalBase.h:42
PositionType max_
upper right point
Definition DIntervalBase.h:339
PositionType const & minPosition() const
Accessor to minimum position.
Definition DIntervalBase.h:98
bool operator==(const DIntervalBase &rhs) const
Equality operator.
Definition DIntervalBase.h:169
DPosition< D > PositionType
Position type.
Definition DIntervalBase.h:40
DIntervalBase & operator=(const DIntervalBase &rhs)
Assignment operator.
Definition DIntervalBase.h:70
unsigned int UInt
Unsigned integer type.
Definition Types.h:64
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
void hash_combine(std::size_t &seed, std::size_t value) noexcept
Combine a hash value with additional data using golden ratio mixing.
Definition HashUtils.h:87
std::size_t hash_float(T value) noexcept
Hash for a floating point type (float or double).
Definition HashUtils.h:142
std::size_t operator()(const OpenMS::DBoundingBox< D > &bb) const noexcept
Definition DBoundingBox.h:208