Representation of a coordinate in D-dimensional space. More...
#include <OpenMS/DATASTRUCTURES/DPosition.h>
Public Types | |
| enum | { DIMENSION = D } |
| Dimensions. More... | |
| typedef TCoordinateType | CoordinateType |
| Coordinate type. More... | |
| typedef CoordinateType * | Iterator |
| Mutable iterator. More... | |
| typedef const CoordinateType * | ConstIterator |
| Non-mutable iterator. More... | |
STL compatibility type definitions | |
| typedef CoordinateType | value_type |
| typedef CoordinateType & | reference |
| typedef CoordinateType * | pointer |
| typedef CoordinateType * | iterator |
| typedef const CoordinateType * | const_iterator |
Public Member Functions | |
Constructors and Destructor | |
| DPosition () | |
| Default constructor. More... | |
| ~DPosition () | |
| Destructor (not-virtual as this will save a lot of space!) More... | |
| DPosition (CoordinateType x) | |
Constructor that fills all dimensions with the value x. More... | |
| DPosition (const DPosition &pos) | |
| Copy constructor. More... | |
| DPosition (CoordinateType x, CoordinateType y) | |
| Constructor only for DPosition<2> that takes two Coordinates. More... | |
| DPosition & | operator= (const DPosition &source) |
| Assignment operator. More... | |
Iteration | |
| ConstIterator | begin () const |
| Non-mutable begin iterator. More... | |
| ConstIterator | end () const |
| Non-mutable end iterator. More... | |
| Iterator | begin () |
| Mutable begin iterator. More... | |
| Iterator | end () |
| Mutable end iterator. More... | |
Static Public Member Functions | |
Static values | |
| static const DPosition | zero () |
| all zero More... | |
| static const DPosition | minPositive () |
| smallest positive More... | |
| static const DPosition | minNegative () |
| smallest negative More... | |
| static const DPosition | maxPositive () |
| largest positive More... | |
Protected Attributes | |
| CoordinateType | coordinate_ [D] |
Accessors | |
| CoordinateType | operator[] (Size index) const |
| Const accessor for the dimensions. More... | |
| CoordinateType & | operator[] (Size index) |
| Accessor for the dimensions. More... | |
| CoordinateType | getX () const |
| Name accessor for the first dimension. Only for DPosition<2>, for visualization. More... | |
| CoordinateType | getY () const |
| Name accessor for the second dimension. Only for DPosition<2>, for visualization. More... | |
| void | setX (CoordinateType c) |
| Name mutator for the first dimension. Only for DPosition<2>, for visualization. More... | |
| void | setY (CoordinateType c) |
| Name mutator for the second dimension. Only for DPosition<2>, for visualization. More... | |
| bool | operator== (const DPosition &point) const |
| Equality operator. More... | |
| bool | operator!= (const DPosition &point) const |
| Equality operator. More... | |
| bool | operator< (const DPosition &point) const |
| Lexicographical less than operator. Lexicographical comparison from dimension 0 to dimension D-1 is done. More... | |
| bool | operator<= (const DPosition &point) const |
| Lexicographical greater less or equal operator. More... | |
| bool | spatiallyLessEqual (const DPosition &point) const |
| Spatially (geometrically) less or equal operator. All coordinates must be "<=". More... | |
| bool | spatiallyGreaterEqual (const DPosition &point) const |
| Spatially (geometrically) greater or equal operator. All coordinates must be ">=". More... | |
| bool | operator> (const DPosition &point) const |
| Lexicographical greater than operator. More... | |
| bool | operator>= (const DPosition &point) const |
| Lexicographical greater or equal operator. More... | |
| DPosition | operator+ (const DPosition &point) const |
| Addition (a bit inefficient) More... | |
| DPosition & | operator+= (const DPosition &point) |
| Addition. More... | |
| DPosition | operator- (const DPosition &point) const |
| Subtraction (a bit inefficient) More... | |
| DPosition & | operator-= (const DPosition &point) |
| Subtraction. More... | |
| DPosition | operator- () const |
| Negation (a bit inefficient) More... | |
| CoordinateType | operator* (const DPosition &point) const |
| Inner product. More... | |
| DPosition & | operator*= (CoordinateType scalar) |
| Scalar multiplication. More... | |
| DPosition & | operator/= (CoordinateType scalar) |
| Scalar division. More... | |
| void | clear () |
| Set all dimensions to zero. More... | |
| static Size | size () |
| Returns the number of dimensions. More... | |
Representation of a coordinate in D-dimensional space.
| typedef const CoordinateType* const_iterator |
| typedef const CoordinateType* ConstIterator |
Non-mutable iterator.
| typedef TCoordinateType CoordinateType |
Coordinate type.
| typedef CoordinateType* Iterator |
Mutable iterator.
| typedef CoordinateType* iterator |
| typedef CoordinateType* pointer |
| typedef CoordinateType& reference |
| typedef CoordinateType value_type |
|
inline |
Default constructor.
Creates a position with all coordinates zero.
Referenced by DPosition< DIMENSION >::maxPositive(), DPosition< DIMENSION >::minNegative(), and DPosition< DIMENSION >::minPositive().
|
inline |
Destructor (not-virtual as this will save a lot of space!)
|
inline |
Constructor that fills all dimensions with the value x.
|
inline |
Constructor only for DPosition<2> that takes two Coordinates.
|
inline |
Non-mutable begin iterator.
Referenced by HashGrid< Cluster >::cellindexAtClustercenter_(), HierarchicalClustering< SILACPattern * >::coordDist_(), HierarchicalClustering< SILACPattern * >::coordElemDiv_(), HierarchicalClustering< SILACPattern * >::coordElemGreater_(), HierarchicalClustering< SILACPattern * >::coordScalarDiv_(), OpenMS::hash_value(), and HashGrid< Cluster >::updateGridDimension_().
|
inline |
Mutable begin iterator.
|
inline |
Set all dimensions to zero.
Referenced by AveragePosition< 2 >::add(), AveragePosition< 2 >::clear(), and DPosition< DIMENSION >::DPosition().
|
inline |
Non-mutable end iterator.
Referenced by HashGrid< Cluster >::cellindexAtClustercenter_(), HierarchicalClustering< SILACPattern * >::coordDist_(), HierarchicalClustering< SILACPattern * >::coordElemDiv_(), HierarchicalClustering< SILACPattern * >::coordElemGreater_(), HierarchicalClustering< SILACPattern * >::coordScalarDiv_(), OpenMS::hash_value(), and HashGrid< Cluster >::updateGridDimension_().
|
inline |
Mutable end iterator.
|
inline |
Name accessor for the first dimension. Only for DPosition<2>, for visualization.
|
inline |
Name accessor for the second dimension. Only for DPosition<2>, for visualization.
|
inlinestatic |
largest positive
|
inlinestatic |
smallest negative
|
inlinestatic |
smallest positive
|
inline |
Equality operator.
|
inline |
Inner product.
|
inline |
Scalar multiplication.
Addition (a bit inefficient)
Subtraction (a bit inefficient)
|
inline |
Negation (a bit inefficient)
|
inline |
Scalar division.
|
inline |
Lexicographical less than operator. Lexicographical comparison from dimension 0 to dimension D-1 is done.
Referenced by DPosition< DIMENSION >::operator>=().
|
inline |
Lexicographical greater less or equal operator.
Referenced by DPosition< DIMENSION >::operator>().
|
inline |
Equality operator.
Referenced by DPosition< DIMENSION >::operator!=().
|
inline |
Lexicographical greater than operator.
|
inline |
Lexicographical greater or equal operator.
|
inline |
Const accessor for the dimensions.
|
inline |
Accessor for the dimensions.
|
inline |
Name mutator for the first dimension. Only for DPosition<2>, for visualization.
Referenced by KroenikFile::load().
|
inline |
Name mutator for the second dimension. Only for DPosition<2>, for visualization.
Referenced by KroenikFile::load().
|
inlinestatic |
Returns the number of dimensions.
|
inline |
Spatially (geometrically) greater or equal operator. All coordinates must be ">=".
|
inline |
Spatially (geometrically) less or equal operator. All coordinates must be "<=".
|
inlinestatic |
all zero
|
protected |
Referenced by DPosition< DIMENSION >::begin(), DPosition< DIMENSION >::clear(), DPosition< DIMENSION >::DPosition(), DPosition< DIMENSION >::end(), DPosition< DIMENSION >::getX(), DPosition< DIMENSION >::getY(), DPosition< DIMENSION >::operator*(), DPosition< DIMENSION >::operator*=(), DPosition< DIMENSION >::operator+(), DPosition< DIMENSION >::operator+=(), DPosition< DIMENSION >::operator-(), DPosition< DIMENSION >::operator-=(), DPosition< DIMENSION >::operator/=(), DPosition< DIMENSION >::operator<(), DPosition< DIMENSION >::operator<=(), DPosition< DIMENSION >::operator=(), DPosition< DIMENSION >::operator==(), DPosition< DIMENSION >::operator[](), DPosition< DIMENSION >::setX(), DPosition< DIMENSION >::setY(), DPosition< DIMENSION >::spatiallyGreaterEqual(), and DPosition< DIMENSION >::spatiallyLessEqual().
| OpenMS / TOPP release 1.11.1 | Documentation generated on Thu Nov 14 2013 11:19:29 using doxygen 1.8.5 |