Maintain an average position by summing up positions with weights. More...
#include <OpenMS/MATH/STATISTICS/AveragePosition.h>
| Public Types | |
| enum | { DIMENSION = D } | 
| Dimensionality.  More... | |
| typedef DPosition< DIMENSION > | PositionType | 
| Position type (a D-dimensional position)  More... | |
| typedef PositionType::CoordinateType | CoordinateType | 
| Weight type (for weighted average - a scalar type)  More... | |
| Public Member Functions | |
| AveragePosition () | |
| Default constructor.  More... | |
| AveragePosition (AveragePosition const &rhs) | |
| Copy constructor.  More... | |
| PositionType const & | getPosition () const | 
| Returns the current average position.  More... | |
| CoordinateType const & | getWeight () const | 
| Returns the total weight.  More... | |
| void | clear () | 
| Reset everything. (Note that update()will cause a division by zero after that.)  More... | |
| void | add (PositionType position, CoordinateType const weight=1) | 
| Add a position.  More... | |
| Protected Attributes | |
| PositionType | position_ | 
| PositionType | position_weighted_sum_ | 
| CoordinateType | weight_sum_ | 
Maintain an average position by summing up positions with weights.
Weight type (for weighted average - a scalar type)
| typedef DPosition<DIMENSION> PositionType | 
Position type (a D-dimensional position)
| 
 | inline | 
Default constructor.
| 
 | inline | 
Copy constructor.
| 
 | inline | 
Add a position.
Referenced by SimpleExtender< PeakType, FeatureType >::extend().
| 
 | inline | 
Reset everything. (Note that update() will cause a division by zero after that.) 
Referenced by SimpleExtender< PeakType, FeatureType >::extend().
| 
 | inline | 
Returns the current average position.
Referenced by SimpleExtender< PeakType, FeatureType >::isTooFarFromCentroid_().
| 
 | inline | 
Returns the total weight.
| 
 | protected | 
Referenced by AveragePosition< 2 >::add(), AveragePosition< 2 >::clear(), and AveragePosition< 2 >::getPosition().
| 
 | protected | 
Referenced by AveragePosition< 2 >::add(), and AveragePosition< 2 >::clear().
| 
 | protected | 
Referenced by AveragePosition< 2 >::add(), AveragePosition< 2 >::clear(), and AveragePosition< 2 >::getWeight().
| OpenMS / TOPP release 1.11.1 | Documentation generated on Thu Nov 14 2013 11:19:38 using doxygen 1.8.5 |