|
xrpld
|
Basic histogram. More...
#include <Histogram.h>

Public Member Functions | |
| void | insert (T const &s) |
| Insert an sample. | |
| std::size_t | size () const |
| The number of samples. | |
| std::size_t | numBins () const |
| The number of distinct samples (bins). | |
| T | minValue () const |
| Minimum observed value. | |
| T | maxValue () const |
| Maximum observed value. | |
| T | avg () const |
| Histogram average. | |
| T | percentile (float p) const |
| Calculate the given percentile of the distribution. | |
Private Attributes | |
| std::map< T, std::size_t, Compare > | counts_ |
| std::size_t | samples_ = 0 |
Basic histogram.
Histogram for a type T that satisfies
Definition at line 23 of file Histogram.h.
| void xrpl::test::csf::Histogram< T, Compare >::insert | ( | T const & | s | ) |
Insert an sample.
Definition at line 33 of file Histogram.h.
|
nodiscard |
The number of samples.
Definition at line 41 of file Histogram.h.
|
nodiscard |
The number of distinct samples (bins).
Definition at line 48 of file Histogram.h.
|
nodiscard |
Minimum observed value.
Definition at line 55 of file Histogram.h.
|
nodiscard |
Maximum observed value.
Definition at line 62 of file Histogram.h.
|
nodiscard |
Histogram average.
Definition at line 69 of file Histogram.h.
|
nodiscard |
Calculate the given percentile of the distribution.
| p | Percentile between 0 and 1, e.g. 0.50 is 50-th percentile If the percentile falls between two bins, uses the nearest bin. |
Definition at line 90 of file Histogram.h.
|
private |
Definition at line 27 of file Histogram.h.
|
private |
Definition at line 28 of file Histogram.h.