A D-dimensional half-open interval. More...
#include <OpenMS/DATASTRUCTURES/DRange.h>
Public Types | |
Type definitions | |
| enum | { DIMENSION = D } |
Dimensions. More... | |
| enum | DRangeIntersection { Disjoint, Intersects, Inside } |
Types that describe the kind of intersection between two ranges. 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 | |
| DRange () | |
| Default constructor. | |
| DRange (const PositionType &lower, const PositionType &upper) | |
| Constructor that takes two Points and constructs a range. | |
| DRange (const DRange &range) | |
| Copy constructor. | |
| DRange (const Base &range) | |
| Copy constructor for the base class. | |
| DRange (CoordinateType minx, CoordinateType miny, CoordinateType maxx, CoordinateType maxy) | |
| Convenient constructor for DRange<2> | |
| DRange & | operator= (const DRange &rhs) |
| Assignement operator. | |
| DRange & | operator= (const Base &rhs) |
| Assignement operator for the base class. | |
| ~DRange () | |
| Destuctor. | |
Predicates | |
| bool | operator== (const DRange &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 of encloses for convenience only | |
| DRange | united (const DRange< D > &other_range) const |
Returns the smallest range containing this range and other_range. | |
| DRangeIntersection | intersects (const DRange &range) const |
Checks how this range intersects with another range. | |
| bool | isIntersected (const DRange &range) const |
Checks whether this range intersects with another range. | |
| bool | isEmpty () const |
| Checks if the range is empty. | |
A D-dimensional half-open interval.
This class describes a range in D-dimensional space delimited by two points (i.e. a D-dimensional hyper-rectangle). The two points define the lower left and the upper right corner in 2D and analogous points in higer dimensions.
A range is a pair of positions in D-space represented by DPosition. The two limiting points are accessed as minPosition() and maxPosition().
A range denotes a semi-open interval. A lower coordinate of each dimension is part the range, the higher coordinate is not.
| typedef Internal::DIntervalBase<D> Base |
Base class type.
| typedef Base::CoordinateType CoordinateType |
Coordinate type of the positions.
Reimplemented from DIntervalBase< D >.
| typedef Base::PositionType PositionType |
Position type.
Reimplemented from DIntervalBase< D >.
| enum DRangeIntersection |
| DRange | ( | ) | [inline] |
Default constructor.
Creates a range with all coordinates zero.
| DRange | ( | const PositionType & | lower, | |
| const PositionType & | upper | |||
| ) | [inline] |
Constructor that takes two Points and constructs a range.
| DRange | ( | CoordinateType | minx, | |
| CoordinateType | miny, | |||
| CoordinateType | maxx, | |||
| CoordinateType | maxy | |||
| ) | [inline] |
Convenient constructor for DRange<2>
| ~DRange | ( | ) | [inline] |
Destuctor.
| bool encloses | ( | const PositionType & | position | ) | const [inline] |
Checks whether this range contains a certain point.
| position | The point's position. |
Referenced by MzDataHandler< MapType >::cvParam_(), MzXMLHandler< MapType >::endElement(), MzMLHandler< MapType >::fillChromatogramData_(), MzMLHandler< MapType >::fillData_(), MzDataHandler< MapType >::fillData_(), MzMLHandler< MapType >::handleCVParam_(), DRange< 3 >::intersects(), DRange< 3 >::isIntersected(), and MzXMLHandler< MapType >::startElement().
| bool encloses | ( | CoordinateType | x, | |
| CoordinateType | y | |||
| ) | const [inline] |
2D-version of encloses for convenience only
| DRangeIntersection intersects | ( | const DRange< D > & | range | ) | const [inline] |
Checks how this range intersects with another range.
| range | The max_ range. |
| bool isEmpty | ( | ) | const [inline] |
Checks if the range is empty.
| bool isIntersected | ( | const DRange< D > & | range | ) | const [inline] |
Checks whether this range intersects with another range.
| range | The max_ range. |
| bool operator== | ( | const Base & | rhs | ) | const [inline] |
Equality operator.
| bool operator== | ( | const DRange< D > & | rhs | ) | const [inline] |
Equality operator.
| OpenMS / TOPP release 1.10.0 | Documentation generated on Thu Mar 7 2013 09:42:52 using doxygen 1.7.1 |