Public Member Functions | |
def | __init__ (self, bFloat=True) |
def | clear (self, bFloat=True) |
def | add (self, value, weight=1) |
def | n (self) |
def | weights (self) |
def | sum (self) |
def | min (self) |
def | max (self) |
def | sumsq (self) |
def | average (self) |
def | sqaverage (self) |
def | rms2 (self) |
def | rms (self) |
def | stdev (self) |
def | stdevp (self) |
Public Attributes | |
e_n | |
e_w | |
e_sum | |
e_sumsq | |
e_min | |
e_max | |
Statistics collector. This class accumulates statistics on a single variable. A new entry is added by add(), that allowes an optional weight. At any time, the following information about the sample of x is available: - n(): number of additions - weights(): total weight (matches n() unless weights are specified) - sum(): weighted sum of x - min(): minimum value of x seen so far (None if no entries yet) - max(): maximum value of x seen so far (None if no entries yet) - sumsq(): weighted sum of x^2 - average(): weighted average of x (0 if no entries yet) - sqaverage(): weighted average of x^2 (0 if no entries yet) - rms(): the Root Mean Square (including weights) - rms2(): the square of the RMS (including weights) - stdev(): standard deviation (0 if less than two events) - stdevp(): an alias for rms() The construction allows to specify bFloat = false, in which case the accumulators are integral types (int) until a real type value or weight is add()ed.
Definition at line 45 of file SortModuleTimes.py.
def SortModuleTimes.Stats.__init__ | ( | self, | |
bFloat = True |
|||
) |
Statistics collector. This class accumulates statistics on a single variable. A new entry is added by add(), that allowes an optional weight. At any time, the following information about the sample of x is available: - n(): number of additions - weights(): total weight (matches n() unless weights are specified) - sum(): weighted sum of x - min(): minimum value of x seen so far (None if no entries yet) - max(): maximum value of x seen so far (None if no entries yet) - sumsq(): weighted sum of x^2 - average(): weighted average of x (0 if no entries yet) - sqaverage(): weighted average of x^2 (0 if no entries yet) - rms(): the Root Mean Square (including weights) - rms2(): the square of the RMS (including weights) - stdev(): standard deviation (0 if less than two events) - stdevp(): an alias for rms() The construction allows to specify bFloat = false, in which case the accumulators are integral types (int) until a real type value or weight is add()ed.
Definition at line 68 of file SortModuleTimes.py.
def SortModuleTimes.Stats.add | ( | self, | |
value, | |||
weight = 1 |
|||
) |
Add a new item. The addition is treated as integer only if both value and weight are integrals.
Definition at line 85 of file SortModuleTimes.py.
def SortModuleTimes.Stats.average | ( | self | ) |
Definition at line 105 of file SortModuleTimes.py.
def SortModuleTimes.Stats.clear | ( | self, | |
bFloat = True |
|||
) |
Definition at line 71 of file SortModuleTimes.py.
def SortModuleTimes.Stats.max | ( | self | ) |
Definition at line 103 of file SortModuleTimes.py.
def SortModuleTimes.Stats.min | ( | self | ) |
Definition at line 102 of file SortModuleTimes.py.
def SortModuleTimes.Stats.n | ( | self | ) |
Definition at line 99 of file SortModuleTimes.py.
def SortModuleTimes.Stats.rms | ( | self | ) |
Definition at line 112 of file SortModuleTimes.py.
def SortModuleTimes.Stats.rms2 | ( | self | ) |
Definition at line 111 of file SortModuleTimes.py.
def SortModuleTimes.Stats.sqaverage | ( | self | ) |
Definition at line 108 of file SortModuleTimes.py.
def SortModuleTimes.Stats.stdev | ( | self | ) |
Definition at line 113 of file SortModuleTimes.py.
def SortModuleTimes.Stats.stdevp | ( | self | ) |
Definition at line 116 of file SortModuleTimes.py.
def SortModuleTimes.Stats.sum | ( | self | ) |
Definition at line 101 of file SortModuleTimes.py.
def SortModuleTimes.Stats.sumsq | ( | self | ) |
Definition at line 104 of file SortModuleTimes.py.
def SortModuleTimes.Stats.weights | ( | self | ) |
Definition at line 100 of file SortModuleTimes.py.
SortModuleTimes.Stats.e_max |
Definition at line 82 of file SortModuleTimes.py.
SortModuleTimes.Stats.e_min |
Definition at line 81 of file SortModuleTimes.py.
SortModuleTimes.Stats.e_n |
Definition at line 72 of file SortModuleTimes.py.
SortModuleTimes.Stats.e_sum |
Definition at line 75 of file SortModuleTimes.py.
SortModuleTimes.Stats.e_sumsq |
Definition at line 76 of file SortModuleTimes.py.
SortModuleTimes.Stats.e_w |
Definition at line 74 of file SortModuleTimes.py.