#include <OpenMS/MATH/STATISTICS/AveragePosition.h>
Public Types | |
enum | { DIMENSION = D } |
Dimensionality. More... | |
typedef DPosition< DIMENSION > | PositionType |
Position type (a D-dimensional position). | |
typedef PositionType::CoordinateType | CoordinateType |
Weight type (for weighted average - a scalar type). | |
Public Member Functions | |
AveragePosition () | |
Default constructor. | |
AveragePosition (AveragePosition const &rhs) | |
Copy constructor. | |
PositionType const & | getPosition () const |
Returns the current average position. | |
CoordinateType const & | getWeight () const |
Returns the total weight. | |
void | clear () |
Reset everything. (Note that update() will cause a division by zero after that.). | |
void | add (PositionType position, CoordinateType const weight=1) |
Add a position. | |
Protected Attributes | |
PositionType | position_ |
PositionType | position_weighted_sum_ |
CoordinateType | weight_sum_ |
typedef DPosition<DIMENSION> PositionType |
Position type (a D-dimensional position).
Weight type (for weighted average - a scalar type).
AveragePosition | ( | ) | [inline] |
Default constructor.
AveragePosition | ( | AveragePosition< D > const & | rhs | ) | [inline] |
Copy constructor.
PositionType const& getPosition | ( | ) | const [inline] |
Returns the current average position.
CoordinateType const& getWeight | ( | ) | const [inline] |
Returns the total weight.
void clear | ( | ) | [inline] |
Reset everything. (Note that update()
will cause a division by zero after that.).
void add | ( | PositionType | position, | |
CoordinateType const | weight = 1 | |||
) | [inline] |
Add a position.
PositionType position_ [protected] |
PositionType position_weighted_sum_ [protected] |
CoordinateType weight_sum_ [protected] |
Generated Tue Apr 1 15:36:50 2008 -- using doxygen 1.5.4 | OpenMS / TOPP 1.1 |