gem5
v19.0.0.0
|
Templatized storage and interface for a distribution that calculates mean and variance. More...
#include <statistics.hh>
Classes | |
struct | Params |
Public Member Functions | |
SampleStor (Info *info) | |
Create and initialize this storage. More... | |
void | sample (Counter val, int number) |
Add a value the given number of times to this running average. More... | |
size_type | size () const |
Return the number of entries in this stat, 1. More... | |
bool | zero () const |
Return true if no samples have been added. More... | |
void | prepare (Info *info, DistData &data) |
void | reset (Info *info) |
Reset stat value to default. More... | |
Private Attributes | |
Counter | sum |
The current sum. More... | |
Counter | squares |
The sum of squares. More... | |
Counter | samples |
The number of samples. More... | |
Templatized storage and interface for a distribution that calculates mean and variance.
Definition at line 1693 of file statistics.hh.
|
inline |
Create and initialize this storage.
Definition at line 1713 of file statistics.hh.
Definition at line 1745 of file statistics.hh.
References Stats::Deviation, safe_cast(), Stats::DistData::samples, Stats::DistData::squares, Stats::Info::storageParams, Stats::DistData::sum, Stats::sum(), Stats::DistData::type, and Stats::DistParams::type.
|
inline |
Reset stat value to default.
Definition at line 1760 of file statistics.hh.
|
inline |
Add a value the given number of times to this running average.
Update the running sum and sum of squares, increment the number of values seen by the given number.
val | The value to add. |
number | The number of times to add the value. |
Definition at line 1725 of file statistics.hh.
|
inline |
Return the number of entries in this stat, 1.
Definition at line 1736 of file statistics.hh.
|
inline |
Return true if no samples have been added.
Definition at line 1742 of file statistics.hh.
|
private |
The number of samples.
Definition at line 1707 of file statistics.hh.
|
private |
The sum of squares.
Definition at line 1705 of file statistics.hh.
|
private |
The current sum.
Definition at line 1703 of file statistics.hh.