ls1-MarDyn
ls1-MarDyn molecular dynamics code
|
#include <Accumulator.h>
Public Member Functions | |
Accumulator (bool accX, bool accY, bool accZ) | |
double | CalcKineticEnergyContribution (Molecule *mol) |
void | ScaleVelocityComponents (Molecule *mol, double vcorr) |
Accumulator (size_t windowLength=100) | |
~Accumulator () | |
T | getAverage () |
T | getStddev () |
T | getPercentile (double p) |
T | getInterPercentileRange (double pmin, double pmax) |
void | addEntry (T value) |
T | getLastEntry () |
T | getEntry (size_t id) |
size_t | getWindowLength () |
size_t | getSize () |
A generalized Accumlator for scalar values.
The accumulator uses a sliding window to calculate average values.
|
inline |
Constructor creating new Accumlator
[in] | windowLength | Number of elements in the sliding window. |
|
inline |
Destructor
|
inline |
Move sliding window forward by adding a new value replacing the oldest entry.
[in] | value | value to be inserted at the begin of the moved window. |
|
inline |
Return the average of the values in the sliding window.
|
inline |
Return the entry added id times before.
[in] | id | ID of element, 1 gives the last added element. |
|
inline |
Return inter percentile range
[in] | pmin | lower percentile as real, e.g. 0.25 for the median (25%) |
[in] | pmax | upper percentile as real, e.g. 0.75 for the median (75%) |
|
inline |
Return the last added value.
|
inline |
Return percentile
[in] | p | percentile as real, e.g. 0.5 for the median (50%) |
|
inline |
Get the number of elements within the sliding window. The number of elements can be less than the window length as long as not enough elements were added to the accumulator. This method allows to query for the number of elements in the window.
|
inline |
Return the standard deviation of the values in the sliding window.
|
inline |
Get the size of the sliding window.