#include <OpenMS/DATASTRUCTURES/DBoundingBox.h>
A DBoundingBox denotes a closed interval. Upper and lower margins are both contained.
Public Types | |
Type definitions | |
enum | { DIMENSION = D } |
Dimensions. More... | |
typedef Internal::DIntervalBase< D > | Base |
Base class type. | |
typedef Base::PositionType | PositionType |
Position type. | |
typedef Base::CoordinateType | CoordinateType |
Coordinate type of the positions. | |
Public Member Functions | |
Constructors and Destructor | |
DBoundingBox () | |
Default constructor. | |
DBoundingBox (const DBoundingBox &rhs) | |
Copy constructor. | |
DBoundingBox & | operator= (const DBoundingBox &rhs) |
Assignement operator. | |
DBoundingBox & | operator= (const Base &rhs) |
Assignement operator for the base class. | |
~DBoundingBox () | |
Destructor. | |
DBoundingBox (const PositionType &minimum, const PositionType &maximum) | |
Constructor from two positions. | |
Accessors | |
void | enlarge (const PositionType &p) |
Enlarges the bounding box such that it contains a position. | |
void | enlarge (CoordinateType x, CoordinateType y) |
2D-version enlarge(x,y) is for convenience only | |
Predicates | |
bool | operator== (const DBoundingBox &rhs) const |
Equality operator. | |
bool | operator== (const Base &rhs) const |
Equality operator. | |
bool | encloses (const PositionType &position) const |
Checks whether this range contains a certain point. | |
bool | encloses (CoordinateType x, CoordinateType y) const |
2D-version encloses(x,y) is for convenience only | |
bool | intersects (const DBoundingBox &bounding_box) const |
bool | isEmpty () const |
Test if bounding box is empty. | |
Related Functions | |
(Note that these are not member functions.) | |
template<UInt D> | |
std::ostream & | operator<< (std::ostream &os, const DBoundingBox< D > &bounding_box) |
Print the contents to a stream. |
typedef Internal::DIntervalBase<D> Base |
Base class type.
typedef Base::PositionType PositionType |
typedef Base::CoordinateType CoordinateType |
DBoundingBox | ( | ) | [inline] |
Default constructor.
DBoundingBox | ( | const DBoundingBox< D > & | rhs | ) | [inline] |
Copy constructor.
~DBoundingBox | ( | ) | [inline] |
Destructor.
DBoundingBox | ( | const PositionType & | minimum, | |
const PositionType & | maximum | |||
) | [inline] |
Constructor from two positions.
DBoundingBox& operator= | ( | const DBoundingBox< D > & | rhs | ) | [inline] |
Assignement operator.
DBoundingBox& operator= | ( | const Base & | rhs | ) | [inline] |
Assignement operator for the base class.
void enlarge | ( | const PositionType & | p | ) | [inline] |
Enlarges the bounding box such that it contains a position.
void enlarge | ( | CoordinateType | x, | |
CoordinateType | y | |||
) | [inline] |
2D-version enlarge(x,y) is for convenience only
bool operator== | ( | const DBoundingBox< D > & | rhs | ) | const [inline] |
Equality operator.
bool operator== | ( | const Base & | rhs | ) | const [inline] |
Equality operator.
bool encloses | ( | const PositionType & | position | ) | const [inline] |
Checks whether this range contains a certain point.
position | The point's position. |
bool encloses | ( | CoordinateType | x, | |
CoordinateType | y | |||
) | const [inline] |
2D-version encloses(x,y) is for convenience only
bool intersects | ( | const DBoundingBox< D > & | bounding_box | ) | const [inline] |
Checks whether this bounding box intersects with another bounding box
bool isEmpty | ( | ) | const [inline] |
Test if bounding box is empty.
std::ostream & operator<< | ( | std::ostream & | os, | |
const DBoundingBox< D > & | bounding_box | |||
) | [related] |
Print the contents to a stream.
Generated Tue Apr 1 15:36:43 2008 -- using doxygen 1.5.4 | OpenMS / TOPP 1.1 |