Mantid
|
A simple class holding some statistics on the distribution of events in a particular dimension. More...
#include <MDDimensionStats.h>
Public Member Functions | |
void | addPoint (const coord_t x) |
Add a point with the given coordinate; track the mean and variance. More... | |
coord_t | getApproxVariance () const |
Returns the approximate standard deviation of the position of events in this dimension. More... | |
coord_t | getMean () const |
Returns the mean position of events in this dimension. More... | |
MDDimensionStats () | |
Constructor. More... | |
Public Attributes | |
size_t | numPoints |
Number of points counted (used to give the mean). More... | |
coord_t | total |
Total dimension (summed by each event). More... | |
coord_t | totalApproxVariance |
Approximate variance - used for quick std.deviation estimates. More... | |
A simple class holding some statistics on the distribution of events in a particular dimension.
Definition at line 20 of file MDDimensionStats.h.
|
inline |
Constructor.
Definition at line 23 of file MDDimensionStats.h.
|
inline |
Add a point with the given coordinate; track the mean and variance.
x | :: coordinate value of the point in this dimension. |
Definition at line 37 of file MDDimensionStats.h.
References Mantid::Geometry::x.
|
inline |
Returns the approximate standard deviation of the position of events in this dimension.
Definition at line 31 of file MDDimensionStats.h.
|
inline |
Returns the mean position of events in this dimension.
Definition at line 27 of file MDDimensionStats.h.
size_t Mantid::DataObjects::MDDimensionStats::numPoints |
Number of points counted (used to give the mean).
Definition at line 62 of file MDDimensionStats.h.
coord_t Mantid::DataObjects::MDDimensionStats::total |
Total dimension (summed by each event).
Divide by numPoints to get the mean
Definition at line 49 of file MDDimensionStats.h.
coord_t Mantid::DataObjects::MDDimensionStats::totalApproxVariance |
Approximate variance - used for quick std.deviation estimates.
A running sum of (X - mean(X))^2, where mean(X) is calculated at the time of adding the point. This approximation gets better as the number of points increases.
Divide by the number of points to get the square of the standard deviation!
Definition at line 59 of file MDDimensionStats.h.