Monero
Toggle main menu visibility
Loading...
Searching...
No Matches
contrib
epee
include
stats.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <vector>
4
5
template
<
typename
T,
typename
Tpod = T>
6
class
Stats
7
{
8
public
:
9
Stats
(
const
std::vector<T> &v):
values
(v),
cached
(0) {}
10
~Stats
() {}
11
12
size_t
get_size
()
const
;
13
Tpod
get_min
()
const
;
14
Tpod
get_max
()
const
;
15
Tpod
get_median
()
const
;
16
double
get_mean
()
const
;
17
double
get_confidence_interval_95
()
const
;
18
double
get_confidence_interval_99
()
const
;
19
double
get_standard_deviation
()
const
;
20
double
get_standard_error
()
const
;
21
double
get_variance
()
const
;
22
double
get_kurtosis
()
const
;
23
double
get_non_parametric_skew
()
const
;
24
double
get_t_test
(
T
t)
const
;
25
double
get_t_test
(
size_t
npoints,
double
mean
,
double
stddev)
const
;
26
double
get_t_test
(
const
Stats<T>
&other)
const
;
27
double
get_z_test
(
const
Stats<T>
&other)
const
;
28
double
get_test
(
const
Stats<T>
&other)
const
;
29
std::vector<Tpod>
get_quantiles
(
unsigned
int
quantiles)
const
;
30
std::vector<size_t>
get_bins
(
unsigned
int
bins)
const
;
31
bool
is_same_distribution_95
(
size_t
npoints,
double
mean
,
double
stddev)
const
;
32
bool
is_same_distribution_95
(
const
Stats<T>
&other)
const
;
33
bool
is_same_distribution_99
(
size_t
npoints,
double
mean
,
double
stddev)
const
;
34
bool
is_same_distribution_99
(
const
Stats<T>
&other)
const
;
35
36
double
get_cdf95
(
size_t
df)
const
;
37
double
get_cdf95
(
const
Stats<T>
&other)
const
;
38
double
get_cdf99
(
size_t
df)
const
;
39
double
get_cdf99
(
const
Stats<T>
&other)
const
;
40
41
private
:
42
inline
bool
is_cached
(
int
bit)
const
;
43
inline
void
set_cached
(
int
bit)
const
;
44
45
const
std::vector<T> &
values
;
46
47
mutable
uint64_t
cached
;
48
mutable
Tpod
min
;
49
mutable
Tpod
max
;
50
mutable
Tpod
median
;
51
mutable
double
mean
;
52
mutable
double
standard_deviation
;
53
mutable
double
standard_error
;
54
mutable
double
variance
;
55
mutable
double
kurtosis
;
56
};
57
58
#include "
stats.inl
"
Stats
Definition
stats.h:7
Stats::get_confidence_interval_95
double get_confidence_interval_95() const
Definition
stats.inl:164
Stats::set_cached
void set_cached(int bit) const
Definition
stats.inl:37
Stats::get_variance
double get_variance() const
Definition
stats.inl:229
Stats::get_standard_deviation
double get_standard_deviation() const
Definition
stats.inl:202
Stats::get_size
size_t get_size() const
Definition
stats.inl:43
Stats::kurtosis
double kurtosis
Definition
stats.h:55
Stats::is_same_distribution_99
bool is_same_distribution_99(size_t npoints, double mean, double stddev) const
Definition
stats.inl:190
Stats::median
Tpod median
Definition
stats.h:50
Stats::standard_deviation
double standard_deviation
Definition
stats.h:52
Stats::values
const std::vector< T > & values
Definition
stats.h:45
Stats::variance
double variance
Definition
stats.h:54
Stats::get_kurtosis
double get_kurtosis() const
Definition
stats.inl:241
Stats::get_t_test
double get_t_test(T t) const
Definition
stats.inl:272
Stats::is_same_distribution_95
bool is_same_distribution_95(size_t npoints, double mean, double stddev) const
Definition
stats.inl:178
Stats::get_z_test
double get_z_test(const Stats< T > &other) const
Definition
stats.inl:296
Stats::max
Tpod max
Definition
stats.h:49
Stats::get_mean
double get_mean() const
Definition
stats.inl:98
Stats::get_cdf99
double get_cdf99(size_t df) const
Definition
stats.inl:139
Stats::min
Tpod min
Definition
stats.h:48
Stats::mean
double mean
Definition
stats.h:51
Stats::Stats
Stats(const std::vector< T > &v)
Definition
stats.h:9
Stats::standard_error
double standard_error
Definition
stats.h:53
Stats::~Stats
~Stats()
Definition
stats.h:10
Stats::get_test
double get_test(const Stats< T > &other) const
Definition
stats.inl:312
Stats::get_confidence_interval_99
double get_confidence_interval_99() const
Definition
stats.inl:171
Stats::get_cdf95
double get_cdf95(size_t df) const
Definition
stats.inl:114
Stats::cached
uint64_t cached
Definition
stats.h:47
Stats::get_min
Tpod get_min() const
Definition
stats.inl:49
Stats::is_cached
bool is_cached(int bit) const
Definition
stats.inl:31
Stats::get_non_parametric_skew
double get_non_parametric_skew() const
Definition
stats.inl:266
Stats::get_bins
std::vector< size_t > get_bins(unsigned int bins) const
Definition
stats.inl:349
Stats::get_quantiles
std::vector< Tpod > get_quantiles(unsigned int quantiles) const
Definition
stats.inl:321
Stats::get_standard_error
double get_standard_error() const
Definition
stats.inl:218
Stats::get_median
Tpod get_median() const
Definition
stats.inl:75
Stats::get_max
Tpod get_max() const
Definition
stats.inl:62
stats.inl
uint64_t
unsigned __int64 uint64_t
Definition
stdint.h:136
T
#define T(x)
Generated on
for Monero by
1.17.0