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. | |
| typedef CoordinateType * | Iterator |
| Mutable iterator. | |
| typedef const CoordinateType * | ConstIterator |
| Non-mutable iterator. | |
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. | |
| ~DPosition () | |
| Destructor (not-virtual as this will save a lot of space!). | |
| DPosition (CoordinateType x) | |
Constructor that fills all dimensions with the value x. | |
| DPosition (const DPosition &pos) | |
| Copy constructor. | |
| DPosition (CoordinateType x, CoordinateType y) | |
| Constructor only for DPosition<2> that takes two Coordinates. | |
| DPosition & | operator= (const DPosition &source) |
| Assignment operator. | |
Iteration | |
| ConstIterator | begin () const |
| Non-mutable begin iterator. | |
| ConstIterator | end () const |
| Non-mutable end iterator. | |
| Iterator | begin () |
| Mutable begin iterator. | |
| Iterator | end () |
| Mutable end iterator. | |
Static Public Member Functions | |
Static values | |
| static const DPosition | zero () |
| all zero | |
| static const DPosition | minPositive () |
| smallest positive | |
| static const DPosition | minNegative () |
| smallest negative | |
| static const DPosition | maxPositive () |
| largest positive | |
Protected Attributes | |
| CoordinateType | coordinate_ [D] |
Accessors | |
|
| |
| CoordinateType | operator[] (Size index) const |
| Const accessor for the dimensions. | |
| CoordinateType & | operator[] (Size index) |
| Accessor for the dimensions. | |
| CoordinateType | getX () const |
| Name accessor for the first dimension. Only for DPosition<2>, for visualization. | |
| CoordinateType | getY () const |
| Name accessor for the second dimension. Only for DPosition<2>, for visualization. | |
| void | setX (CoordinateType c) |
| Name mutator for the first dimension. Only for DPosition<2>, for visualization. | |
| void | setY (CoordinateType c) |
| Name mutator for the second dimension. Only for DPosition<2>, for visualization. | |
| bool | operator== (const DPosition &point) const |
| Equality operator. | |
| bool | operator!= (const DPosition &point) const |
| Equality operator. | |
| bool | operator< (const DPosition &point) const |
| Lexicographical less than operator. Lexicographical comparison from dimension 0 to dimension D-1 is done. | |
| bool | operator<= (const DPosition &point) const |
| Lexicographical greater less or equal operator. | |
| bool | spatiallyLessEqual (const DPosition &point) const |
| Spatially (geometrically) less or equal operator. All coordinates must be "<=". | |
| bool | spatiallyGreaterEqual (const DPosition &point) const |
| Spatially (geometrically) greater or equal operator. All coordinates must be ">=". | |
| bool | operator> (const DPosition &point) const |
| Lexicographical greater than operator. | |
| bool | operator>= (const DPosition &point) const |
| Lexicographical greater or equal operator. | |
| DPosition | operator+ (const DPosition &point) const |
| Addition (a bit inefficient). | |
| DPosition & | operator+= (const DPosition &point) |
| Addition. | |
| DPosition | operator- (const DPosition &point) const |
| Subtraction (a bit inefficient). | |
| DPosition & | operator-= (const DPosition &point) |
| Subtraction. | |
| DPosition | operator- () const |
| Negation (a bit inefficient). | |
| CoordinateType | operator* (const DPosition &point) const |
| Inner product. | |
| DPosition & | operator*= (CoordinateType scalar) |
| Scalar multiplication. | |
| DPosition & | operator/= (CoordinateType scalar) |
| Scalar division. | |
| void | clear () |
| Set all dimensions to zero. | |
| static Size | size () |
| Returns the number of dimensions. | |
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 |
| DPosition | ( | ) | [inline] |
Default constructor.
Creates a position with all coordinates zero.
Referenced by DPosition< DIMENSION >::maxPositive(), DPosition< DIMENSION >::minNegative(), DPosition< DIMENSION >::minPositive(), and DPosition< DIMENSION >::zero().
| ~DPosition | ( | ) | [inline] |
Destructor (not-virtual as this will save a lot of space!).
| DPosition | ( | CoordinateType | x | ) | [inline] |
Constructor that fills all dimensions with the value x.
| DPosition | ( | CoordinateType | x, | |
| CoordinateType | y | |||
| ) | [inline] |
Constructor only for DPosition<2> that takes two Coordinates.
| ConstIterator begin | ( | ) | const [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_().
| Iterator begin | ( | ) | [inline] |
Mutable begin iterator.
| void clear | ( | ) | [inline] |
Set all dimensions to zero.
Referenced by AveragePosition< 2 >::add(), AveragePosition< 2 >::clear(), and DPosition< DIMENSION >::DPosition().
| Iterator end | ( | ) | [inline] |
Mutable end iterator.
| ConstIterator end | ( | ) | const [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_().
| CoordinateType getX | ( | ) | const [inline] |
Name accessor for the first dimension. Only for DPosition<2>, for visualization.
| CoordinateType getY | ( | ) | const [inline] |
Name accessor for the second dimension. Only for DPosition<2>, for visualization.
| static const DPosition maxPositive | ( | ) | [inline, static] |
largest positive
| static const DPosition minNegative | ( | ) | [inline, static] |
smallest negative
| static const DPosition minPositive | ( | ) | [inline, static] |
smallest positive
| bool operator!= | ( | const DPosition< D, TCoordinateType > & | point | ) | const [inline] |
Equality operator.
| CoordinateType operator* | ( | const DPosition< D, TCoordinateType > & | point | ) | const [inline] |
Inner product.
| DPosition& operator*= | ( | CoordinateType | scalar | ) | [inline] |
Scalar multiplication.
Addition (a bit inefficient).
Subtraction (a bit inefficient).
| DPosition operator- | ( | ) | const [inline] |
Negation (a bit inefficient).
| DPosition& operator/= | ( | CoordinateType | scalar | ) | [inline] |
Scalar division.
| bool operator< | ( | const DPosition< D, TCoordinateType > & | point | ) | const [inline] |
Lexicographical less than operator. Lexicographical comparison from dimension 0 to dimension D-1 is done.
Referenced by DPosition< DIMENSION >::operator>=().
| bool operator<= | ( | const DPosition< D, TCoordinateType > & | point | ) | const [inline] |
Lexicographical greater less or equal operator.
Referenced by DPosition< DIMENSION >::operator>().
Assignment operator.
| bool operator== | ( | const DPosition< D, TCoordinateType > & | point | ) | const [inline] |
Equality operator.
Referenced by DPosition< DIMENSION >::operator!=().
| bool operator> | ( | const DPosition< D, TCoordinateType > & | point | ) | const [inline] |
Lexicographical greater than operator.
| bool operator>= | ( | const DPosition< D, TCoordinateType > & | point | ) | const [inline] |
Lexicographical greater or equal operator.
| CoordinateType& operator[] | ( | Size | index | ) | [inline] |
Accessor for the dimensions.
| CoordinateType operator[] | ( | Size | index | ) | const [inline] |
Const accessor for the dimensions.
| void setX | ( | CoordinateType | c | ) | [inline] |
Name mutator for the first dimension. Only for DPosition<2>, for visualization.
Referenced by KroenikFile::load().
| void setY | ( | CoordinateType | c | ) | [inline] |
Name mutator for the second dimension. Only for DPosition<2>, for visualization.
Referenced by KroenikFile::load().
| static Size size | ( | ) | [inline, static] |
Returns the number of dimensions.
| bool spatiallyGreaterEqual | ( | const DPosition< D, TCoordinateType > & | point | ) | const [inline] |
Spatially (geometrically) greater or equal operator. All coordinates must be ">=".
| bool spatiallyLessEqual | ( | const DPosition< D, TCoordinateType > & | point | ) | const [inline] |
Spatially (geometrically) less or equal operator. All coordinates must be "<=".
| static const DPosition zero | ( | ) | [inline, static] |
all zero
CoordinateType coordinate_[D] [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.10.0 | Documentation generated on Thu Mar 7 2013 09:42:52 using doxygen 1.7.1 |