A base class for D-dimensional interval. More...
#include <OpenMS/DATASTRUCTURES/DIntervalBase.h>
Public Types | |
Type definitions | |
| enum | { DIMENSION = D } |
Dimensions. More... | |
| typedef DPosition< D > | PositionType |
| Position type. | |
| typedef PositionType::CoordinateType | CoordinateType |
| Coordinate type of the positions. | |
Public Member Functions | |
Constructors and Destructor | |
| DIntervalBase () | |
| Default constructor. | |
| DIntervalBase (const DIntervalBase &rhs) | |
| Copy constructor. | |
| DIntervalBase & | operator= (const DIntervalBase &rhs) |
| Assignment operator. | |
| ~DIntervalBase () | |
| Destructor. | |
| DIntervalBase (PositionType const &minimum, PositionType const &maximum) | |
| This constructor sets min_ and max_ directly. | |
Accessors | |
| PositionType const & | minPosition () const |
| Accessor to minimum position. | |
| PositionType const & | maxPosition () const |
| Accessor to maximum position. | |
| void | setMin (PositionType const &position) |
| Mutator for minimum position. | |
| void | setMax (PositionType const &position) |
| Mutator for maximum position. | |
| void | setMinMax (PositionType const &min, PositionType const &max) |
| Mutator for minimum and maximum position. | |
| template<UInt D2> | |
| void | assign (const DIntervalBase< D2 > rhs) |
| Assignment from a DIntervalBase of different dimensions. | |
Predicates | |
| bool | operator== (const DIntervalBase &rhs) const |
| Equality operator. | |
| bool | operator!= (const DIntervalBase &rhs) const |
| Equality operator. | |
| void | clear () |
| Make the interval empty. | |
Accessors for 2D-intervals (for convenience) | |
| CoordinateType | minX () const |
| Accessor for min_ coordinate minimum. | |
| CoordinateType | minY () const |
| Accessor for max_ coordinate minimum. | |
| CoordinateType | maxX () const |
| Accessor for min_ coordinate maximum. | |
| CoordinateType | maxY () const |
| Accessor for max_ coordinate maximum. | |
| void | setMinX (CoordinateType const c) |
| Mutator for min_ coordinate of the smaller point. | |
| void | setMinY (CoordinateType const c) |
| Mutator for max_ coordinate of the smaller point. | |
| void | setMaxX (CoordinateType const c) |
| Mutator for min_ coordinate of the larger point. | |
| void | setMaxY (CoordinateType const c) |
| Mutator for max_ coordinate of the larger point. | |
| CoordinateType | width () const |
| Returns the width of the area i.e. the difference of dimension zero (X). | |
| CoordinateType | height () const |
| Returns the height of the area i.e. the difference of dimension one (Y). | |
Protected Member Functions | |
| void | normalize_ () |
| normalization to keep all dimensions in the right geometrical order (min_[X] < max_[X]) | |
| DIntervalBase (const std::pair< PositionType, PositionType > &pair) | |
| Protected constructor for the construction of static instances. | |
Protected Attributes | |
| PositionType | min_ |
| lower left point | |
| PositionType | max_ |
| upper right point | |
Misc | |
|
| |
| static DIntervalBase const | empty = DIntervalBase<D>(std::make_pair(DIntervalBase<D>::PositionType::maxPositive(), DIntervalBase<D>::PositionType::minNegative())) |
| empty instance | |
| static DIntervalBase const | zero = DIntervalBase<D>(DIntervalBase<D>::PositionType::zero(), DIntervalBase<D>::PositionType::zero()) |
| instance with all positions zero | |
| PositionType | center () const |
| Returns the center of the interval. | |
| PositionType | diagonal () const |
| Returns the diagonal of the area, i.e. max_ - min_. | |
A base class for D-dimensional interval.
See DIntervalBase for a closed interval and DRange for a half-open interval class.
Coordinate type of the positions.
Reimplemented in DBoundingBox< D >, DRange< D >, DBoundingBox< 1 >, DRange< 1 >, DRange< 2 >, and DRange< 3 >.
| typedef DPosition<D> PositionType |
Position type.
Reimplemented in DBoundingBox< D >, DRange< D >, DBoundingBox< 1 >, DRange< 1 >, DRange< 2 >, and DRange< 3 >.
| DIntervalBase | ( | ) | [inline] |
Default constructor.
Creates an empty interval with corners at infinity.
| DIntervalBase | ( | const DIntervalBase< D > & | rhs | ) | [inline] |
Copy constructor.
| ~DIntervalBase | ( | ) | [inline] |
Destructor.
| DIntervalBase | ( | PositionType const & | minimum, | |
| PositionType const & | maximum | |||
| ) | [inline] |
This constructor sets min_ and max_ directly.
References DIntervalBase< D >::normalize_().
| DIntervalBase | ( | const std::pair< PositionType, PositionType > & | pair | ) | [inline, protected] |
Protected constructor for the construction of static instances.
| void assign | ( | const DIntervalBase< D2 > | rhs | ) | [inline] |
Assignment from a DIntervalBase of different dimensions.
Only the dimensions 0 upto min(D,D2)-1 are copied.
References DIntervalBase< D >::max_, DIntervalBase< D >::maxPosition(), DIntervalBase< D >::min_, and DIntervalBase< D >::minPosition().
| PositionType center | ( | ) | const [inline] |
Returns the center of the interval.
References DIntervalBase< D >::max_, and DIntervalBase< D >::min_.
| void clear | ( | ) | [inline] |
Make the interval empty.
References DIntervalBase< D >::empty.
| PositionType diagonal | ( | ) | const [inline] |
Returns the diagonal of the area, i.e. max_ - min_.
References DIntervalBase< D >::max_, and DIntervalBase< D >::min_.
| CoordinateType height | ( | ) | const [inline] |
Returns the height of the area i.e. the difference of dimension one (Y).
References DIntervalBase< D >::max_, and DIntervalBase< D >::min_.
| PositionType const& maxPosition | ( | ) | const [inline] |
Accessor to maximum position.
References DIntervalBase< D >::max_.
Referenced by IDMapper::annotate(), DIntervalBase< D >::assign(), RangeManager< 2 >::getMaxInt(), FeatureFinderAlgorithmPicked< PeakType, FeatureType >::intersection_(), DBAdapter::loadExperiment(), DBAdapter::loadSpectrum(), DRange< 3 >::united(), FeatureMap< Feature >::updateRanges(), and RangeManager< 2 >::updateRanges_().
| CoordinateType maxX | ( | ) | const [inline] |
Accessor for min_ coordinate maximum.
References DIntervalBase< D >::max_.
| CoordinateType maxY | ( | ) | const [inline] |
Accessor for max_ coordinate maximum.
References DIntervalBase< D >::max_.
Referenced by OfflinePrecursorIonSelection::makePrecursorSelectionForKnownLCMSMap().
| PositionType const& minPosition | ( | ) | const [inline] |
Accessor to minimum position.
References DIntervalBase< D >::min_.
Referenced by IDMapper::annotate(), DIntervalBase< D >::assign(), RangeManager< 2 >::getMinInt(), FeatureFinderAlgorithmPicked< PeakType, FeatureType >::intersection_(), DBAdapter::loadExperiment(), DBAdapter::loadSpectrum(), DRange< 3 >::united(), FeatureMap< Feature >::updateRanges(), and RangeManager< 2 >::updateRanges_().
| CoordinateType minX | ( | ) | const [inline] |
Accessor for min_ coordinate minimum.
References DIntervalBase< D >::min_.
| CoordinateType minY | ( | ) | const [inline] |
Accessor for max_ coordinate minimum.
References DIntervalBase< D >::min_.
Referenced by OfflinePrecursorIonSelection::makePrecursorSelectionForKnownLCMSMap().
| void normalize_ | ( | ) | [inline, protected] |
normalization to keep all dimensions in the right geometrical order (min_[X] < max_[X])
References DIntervalBase< D >::max_, and DIntervalBase< D >::min_.
Referenced by DIntervalBase< D >::DIntervalBase(), and DIntervalBase< D >::setMinMax().
| bool operator!= | ( | const DIntervalBase< D > & | rhs | ) | const [inline] |
Equality operator.
References DIntervalBase< D >::operator==().
| DIntervalBase& operator= | ( | const DIntervalBase< D > & | rhs | ) | [inline] |
Assignment operator.
References DIntervalBase< D >::max_, and DIntervalBase< D >::min_.
Referenced by DRange< 3 >::operator=(), and DBoundingBox< 1 >::operator=().
| bool operator== | ( | const DIntervalBase< D > & | rhs | ) | const [inline] |
Equality operator.
References DIntervalBase< D >::max_, and DIntervalBase< D >::min_.
Referenced by DIntervalBase< D >::operator!=(), DRange< 3 >::operator==(), and DBoundingBox< 1 >::operator==().
| void setMax | ( | PositionType const & | position | ) | [inline] |
Mutator for maximum position.
References DIntervalBase< D >::max_, and DIntervalBase< D >::min_.
| void setMaxX | ( | CoordinateType const | c | ) | [inline] |
Mutator for min_ coordinate of the larger point.
References DIntervalBase< D >::max_, and DIntervalBase< D >::min_.
Referenced by IDMapper::annotate(), TOPPViewBase::layerZoomChanged(), and RangeManager< 2 >::updateRanges_().
| void setMaxY | ( | CoordinateType const | c | ) | [inline] |
Mutator for max_ coordinate of the larger point.
References DIntervalBase< D >::max_, and DIntervalBase< D >::min_.
Referenced by IDMapper::annotate(), and OfflinePrecursorIonSelection::makePrecursorSelectionForKnownLCMSMap().
| void setMin | ( | PositionType const & | position | ) | [inline] |
Mutator for minimum position.
References DIntervalBase< D >::max_, and DIntervalBase< D >::min_.
| void setMinMax | ( | PositionType const & | min, | |
| PositionType const & | max | |||
| ) | [inline] |
Mutator for minimum and maximum position.
References DIntervalBase< D >::max_, DIntervalBase< D >::min_, and DIntervalBase< D >::normalize_().
Referenced by DRange< 3 >::united().
| void setMinX | ( | CoordinateType const | c | ) | [inline] |
Mutator for min_ coordinate of the smaller point.
References DIntervalBase< D >::max_, and DIntervalBase< D >::min_.
Referenced by IDMapper::annotate(), TOPPViewBase::layerZoomChanged(), and RangeManager< 2 >::updateRanges_().
| void setMinY | ( | CoordinateType const | c | ) | [inline] |
Mutator for max_ coordinate of the smaller point.
References DIntervalBase< D >::max_, and DIntervalBase< D >::min_.
Referenced by IDMapper::annotate(), and OfflinePrecursorIonSelection::makePrecursorSelectionForKnownLCMSMap().
| CoordinateType width | ( | ) | const [inline] |
Returns the width of the area i.e. the difference of dimension zero (X).
References DIntervalBase< D >::max_, and DIntervalBase< D >::min_.
Referenced by FeatureFinderAlgorithmPicked< PeakType, FeatureType >::intersection_().
DIntervalBase< D > const empty = DIntervalBase<D>(std::make_pair(DIntervalBase<D>::PositionType::maxPositive(), DIntervalBase<D>::PositionType::minNegative())) [static] |
empty instance
Referenced by DIntervalBase< D >::clear(), and RangeManager< 2 >::clearRanges().
PositionType max_ [protected] |
upper right point
Referenced by DIntervalBase< D >::assign(), DIntervalBase< D >::center(), DIntervalBase< D >::diagonal(), DRange< 3 >::DRange(), DRange< 3 >::encloses(), DBoundingBox< 1 >::encloses(), DBoundingBox< 1 >::enlarge(), DIntervalBase< D >::height(), DRange< 3 >::intersects(), DBoundingBox< 1 >::intersects(), DRange< 3 >::isEmpty(), DBoundingBox< 1 >::isEmpty(), DRange< 3 >::isIntersected(), DIntervalBase< D >::maxPosition(), DIntervalBase< D >::maxX(), DIntervalBase< D >::maxY(), DIntervalBase< D >::normalize_(), DIntervalBase< D >::operator=(), DIntervalBase< D >::operator==(), DIntervalBase< D >::setMax(), DIntervalBase< D >::setMaxX(), DIntervalBase< D >::setMaxY(), DIntervalBase< D >::setMin(), DIntervalBase< D >::setMinMax(), DIntervalBase< D >::setMinX(), DIntervalBase< D >::setMinY(), DRange< 3 >::united(), and DIntervalBase< D >::width().
PositionType min_ [protected] |
lower left point
Referenced by DIntervalBase< D >::assign(), DIntervalBase< D >::center(), DIntervalBase< D >::diagonal(), DRange< 3 >::DRange(), DRange< 3 >::encloses(), DBoundingBox< 1 >::encloses(), DBoundingBox< 1 >::enlarge(), DIntervalBase< D >::height(), DRange< 3 >::intersects(), DBoundingBox< 1 >::intersects(), DRange< 3 >::isEmpty(), DBoundingBox< 1 >::isEmpty(), DRange< 3 >::isIntersected(), DIntervalBase< D >::minPosition(), DIntervalBase< D >::minX(), DIntervalBase< D >::minY(), DIntervalBase< D >::normalize_(), DIntervalBase< D >::operator=(), DIntervalBase< D >::operator==(), DIntervalBase< D >::setMax(), DIntervalBase< D >::setMaxX(), DIntervalBase< D >::setMaxY(), DIntervalBase< D >::setMin(), DIntervalBase< D >::setMinMax(), DIntervalBase< D >::setMinX(), DIntervalBase< D >::setMinY(), DRange< 3 >::united(), and DIntervalBase< D >::width().
DIntervalBase< D > const zero = DIntervalBase<D>(DIntervalBase<D>::PositionType::zero(), DIntervalBase<D>::PositionType::zero()) [static] |
instance with all positions zero
| OpenMS / TOPP release 1.10.0 | Documentation generated on Thu Mar 7 2013 09:42:59 using doxygen 1.7.1 |