Provides statistics calculation for vectors of values.
More...
#include <Statistics.h>
|
MathSize | min () const noexcept |
| Minimum value.
|
|
MathSize | max () const noexcept |
| Maximum value.
|
|
MathSize | median () const noexcept |
| Median value.
|
|
MathSize | mean () const noexcept |
| Mean (average) value.
|
|
MathSize | standardDeviation () const noexcept |
| Standard Deviation.
|
|
MathSize | sampleVariance () const noexcept |
| Sample Variance.
|
|
size_t | n () const noexcept |
| Number of data points in the set.
|
|
MathSize | percentile (const uint8_t i) const noexcept |
| Value for given percentile.
|
|
MathSize | confidenceInterval80 () const |
| 80% Confidence Interval
|
|
MathSize | confidenceInterval90 () const |
| 90% Confidence Interval
|
|
MathSize | confidenceInterval95 () const |
| 95% Confidence Interval
|
|
MathSize | confidenceInterval98 () const |
| 98% Confidence Interval
|
|
MathSize | confidenceInterval99 () const |
| 99% Confidence Interval
|
|
| Statistics (vector< MathSize > values) |
| Calculates statistics on a vector of values.
|
|
MathSize | studentsT () const noexcept |
| Calculate Student's T value.
|
|
bool | isConfident (const MathSize relative_error) const noexcept |
| Whether or not we have less than the relative error and can be confident in the results.
|
|
size_t | runsRequired (const MathSize relative_error) const |
| Estimate how many more runs are required to achieve desired confidence.
|
|
|
MathSize | confidenceInterval (const MathSize z) const |
| Calculate Confidence Interval for given z value.
|
|
|
size_t | n_ |
| Number of values.
|
|
MathSize | min_ |
| Minimum value.
|
|
MathSize | max_ |
| Maximum value.
|
|
MathSize | mean_ |
| Mean (average) value.
|
|
MathSize | median_ |
| Median value.
|
|
MathSize | standard_deviation_ |
| Standard Deviation.
|
|
MathSize | sample_variance_ |
| Sample variance.
|
|
array< MathSize, 101 > | percentiles_ {} |
| Array of all integer percentile values.
|
|
Provides statistics calculation for vectors of values.
◆ Statistics()
fs::util::Statistics::Statistics |
( |
vector< MathSize > | values | ) |
|
|
inlineexplicit |
Calculates statistics on a vector of values.
- Parameters
-
values | Values to use for calculation |
◆ confidenceInterval()
MathSize fs::util::Statistics::confidenceInterval |
( |
const MathSize | z | ) |
const |
|
inlinenodiscardprivate |
Calculate Confidence Interval for given z value.
- Parameters
-
z | Z value to calculate for |
- Returns
- Confidence Interval
◆ confidenceInterval80()
MathSize fs::util::Statistics::confidenceInterval80 |
( |
| ) |
const |
|
inlinenodiscard |
80% Confidence Interval
- Returns
- 80% Confidence Interval
◆ confidenceInterval90()
MathSize fs::util::Statistics::confidenceInterval90 |
( |
| ) |
const |
|
inlinenodiscard |
90% Confidence Interval
- Returns
- 90% Confidence Interval
◆ confidenceInterval95()
MathSize fs::util::Statistics::confidenceInterval95 |
( |
| ) |
const |
|
inlinenodiscard |
95% Confidence Interval
- Returns
- 95% Confidence Interval
◆ confidenceInterval98()
MathSize fs::util::Statistics::confidenceInterval98 |
( |
| ) |
const |
|
inlinenodiscard |
98% Confidence Interval
- Returns
- 98% Confidence Interval
◆ confidenceInterval99()
MathSize fs::util::Statistics::confidenceInterval99 |
( |
| ) |
const |
|
inlinenodiscard |
99% Confidence Interval
- Returns
- 99% Confidence Interval
◆ isConfident()
bool fs::util::Statistics::isConfident |
( |
const MathSize | relative_error | ) |
const |
|
inlinenodiscardnoexcept |
Whether or not we have less than the relative error and can be confident in the results.
- Parameters
-
relative_error | Relative Error that is required |
- Returns
- If Student's T value is less than the relative error
◆ max()
MathSize fs::util::Statistics::max |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Maximum value.
- Returns
- Maximum value
◆ mean()
MathSize fs::util::Statistics::mean |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Mean (average) value.
- Returns
- Mean (average) value
◆ median()
MathSize fs::util::Statistics::median |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Median value.
- Returns
- Median value
◆ min()
MathSize fs::util::Statistics::min |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Minimum value.
- Returns
- Minimum value
◆ n()
size_t fs::util::Statistics::n |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Number of data points in the set.
- Returns
- Number of data points in the set
◆ percentile()
MathSize fs::util::Statistics::percentile |
( |
const uint8_t | i | ) |
const |
|
inlinenodiscardnoexcept |
Value for given percentile.
- Parameters
-
i | Percentile to retrieve value for |
- Returns
- Value for given percentile
◆ runsRequired()
size_t fs::util::Statistics::runsRequired |
( |
const MathSize | relative_error | ) |
const |
|
inlinenodiscard |
Estimate how many more runs are required to achieve desired confidence.
- Parameters
-
cur_runs | Current number of runs completed |
relative_error | Relative Error to achieve to be confident |
- Returns
- Number of runs still required
◆ sampleVariance()
MathSize fs::util::Statistics::sampleVariance |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Sample Variance.
- Returns
- Sample Variance
◆ standardDeviation()
MathSize fs::util::Statistics::standardDeviation |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Standard Deviation.
- Returns
- Standard Deviation
◆ studentsT()
MathSize fs::util::Statistics::studentsT |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Calculate Student's T value.
- Returns
- Student's T value
The documentation for this class was generated from the following file: