35 #ifndef OPENMS_MATH_STATISTICS_AVERAGEPOSITION_H 36 #define OPENMS_MATH_STATISTICS_AVERAGEPOSITION_H 113 void add(PositionType position, CoordinateType
const weight = 1)
145 #endif // OPENMS_MATH_STATISTICS_AVERAGEPOSITION_H CoordinateType weight_sum_
Definition: AveragePosition.h:137
void clear()
Reset everything. (Note that update() will cause a division by zero after that.)
Definition: AveragePosition.h:104
AveragePosition()
Default constructor.
Definition: AveragePosition.h:76
Maintain an average position by summing up positions with weights.
Definition: AveragePosition.h:57
void clear()
Set all dimensions to zero.
Definition: DPosition.h:348
DPosition< DIMENSION > PositionType
Position type (a D-dimensional position)
Definition: AveragePosition.h:68
PositionType position_weighted_sum_
Definition: AveragePosition.h:136
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
PositionType const & getPosition() const
Returns the current average position.
Definition: AveragePosition.h:92
PositionType position_
Definition: AveragePosition.h:135
Definition: AveragePosition.h:64
PositionType::CoordinateType CoordinateType
Weight type (for weighted average - a scalar type)
Definition: AveragePosition.h:71
AveragePosition(AveragePosition const &rhs)
Copy constructor.
Definition: AveragePosition.h:84
CoordinateType const & getWeight() const
Returns the total weight.
Definition: AveragePosition.h:98
void add(PositionType position, CoordinateType const weight=1)
Add a position.
Definition: AveragePosition.h:113
double CoordinateType
Coordinate type.
Definition: DPosition.h:59