LArSoft
v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
|
Class tracking sums of variables up to power 2. More...
#include "StatCollector.h"
Public Types | |
using | Weight_t = typename Base_t::Weight_t |
using | Data_t = T |
type of data More... | |
Public Member Functions | |
Weight_t | SumCube () const |
Returns the weighted sum of the square of the entries. More... | |
Weight_t | SumSq () const |
Returns the weighted sum of the square of the entries. More... | |
void | add (Data_t v, Weight_t w) |
Adds the specified weight to the statistics. More... | |
void | clear () |
Resets the count. More... | |
template<unsigned int N> | |
Weight_t | SumN () const |
Returns the sum of the values to the power N (1 <= N <= 2) More... | |
Weight_t | Sum (unsigned int n) const |
Returns the sum of the values to the power n (1 <= n <= 2, no check) More... | |
Weight_t | Sum () const |
Returns the weighted sum of the entries. More... | |
Static Public Attributes | |
static constexpr unsigned int | Power = PWR |
Protected Attributes | |
std::array< Weight_t, Power > | sums |
Private Types | |
using | Base_t = DataTracker2< T, W, PWR > |
base class type More... | |
Class tracking sums of variables up to power 2.
T | type of the quantity |
W | type of the weight (as T by default) |
Definition at line 161 of file StatCollector.h.
|
private |
base class type
Definition at line 162 of file StatCollector.h.
|
inherited |
type of data
Definition at line 98 of file StatCollector.h.
using lar::util::details::DataTracker3< T, W, PWR >::Weight_t = typename Base_t::Weight_t |
Definition at line 166 of file StatCollector.h.
|
inlineinherited |
Adds the specified weight to the statistics.
Definition at line 105 of file StatCollector.h.
Referenced by lar::util::details::FitDataCollector< T, D >::add().
|
inlineinherited |
Resets the count.
Definition at line 112 of file StatCollector.h.
Referenced by lar::util::details::FitDataCollector< T, D >::clear().
|
inlineinherited |
Returns the sum of the values to the power n (1 <= n <= 2, no check)
Definition at line 124 of file StatCollector.h.
Referenced by lar::util::details::FitDataCollector< T, D >::Print(), and lar::util::details::FitDataCollector< T, D >::XNY().
|
inlineinherited |
Returns the weighted sum of the entries.
Definition at line 127 of file StatCollector.h.
|
inline |
Returns the weighted sum of the square of the entries.
Definition at line 169 of file StatCollector.h.
|
inlineinherited |
Returns the sum of the values to the power N (1 <= N <= 2)
Definition at line 116 of file StatCollector.h.
|
inlineinherited |
Returns the weighted sum of the square of the entries.
Definition at line 149 of file StatCollector.h.
|
staticinherited |
Definition at line 95 of file StatCollector.h.
Referenced by lar::util::details::FitDataCollector< T, D >::Print().
|
protectedinherited |
Definition at line 130 of file StatCollector.h.