FireSTARR
Loading...
Searching...
No Matches
fs::util::Statistics Class Reference

Provides statistics calculation for vectors of values. More...

#include <Statistics.h>

Collaboration diagram for fs::util::Statistics:

Public Member Functions

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.
 

Private Member Functions

MathSize confidenceInterval (const MathSize z) const
 Calculate Confidence Interval for given z value.
 

Private Attributes

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.
 

Detailed Description

Provides statistics calculation for vectors of values.

Constructor & Destructor Documentation

◆ Statistics()

fs::util::Statistics::Statistics ( vector< MathSize > values)
inlineexplicit

Calculates statistics on a vector of values.

Parameters
valuesValues to use for calculation

Member Function Documentation

◆ confidenceInterval()

MathSize fs::util::Statistics::confidenceInterval ( const MathSize z) const
inlinenodiscardprivate

Calculate Confidence Interval for given z value.

Parameters
zZ value to calculate for
Returns
Confidence Interval
Here is the caller graph for this function:

◆ confidenceInterval80()

MathSize fs::util::Statistics::confidenceInterval80 ( ) const
inlinenodiscard

80% Confidence Interval

Returns
80% Confidence Interval
Here is the call graph for this function:

◆ confidenceInterval90()

MathSize fs::util::Statistics::confidenceInterval90 ( ) const
inlinenodiscard

90% Confidence Interval

Returns
90% Confidence Interval
Here is the call graph for this function:

◆ confidenceInterval95()

MathSize fs::util::Statistics::confidenceInterval95 ( ) const
inlinenodiscard

95% Confidence Interval

Returns
95% Confidence Interval
Here is the call graph for this function:

◆ confidenceInterval98()

MathSize fs::util::Statistics::confidenceInterval98 ( ) const
inlinenodiscard

98% Confidence Interval

Returns
98% Confidence Interval
Here is the call graph for this function:

◆ confidenceInterval99()

MathSize fs::util::Statistics::confidenceInterval99 ( ) const
inlinenodiscard

99% Confidence Interval

Returns
99% Confidence Interval
Here is the call graph for this function:

◆ 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_errorRelative Error that is required
Returns
If Student's T value is less than the relative error
Here is the call graph for this function:

◆ 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
Here is the caller graph for this function:

◆ 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
Here is the caller graph for this function:

◆ percentile()

MathSize fs::util::Statistics::percentile ( const uint8_t i) const
inlinenodiscardnoexcept

Value for given percentile.

Parameters
iPercentile 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_runsCurrent number of runs completed
relative_errorRelative Error to achieve to be confident
Returns
Number of runs still required
Here is the call graph for this function:

◆ sampleVariance()

MathSize fs::util::Statistics::sampleVariance ( ) const
inlinenodiscardnoexcept

Sample Variance.

Returns
Sample Variance
Here is the caller graph for this function:

◆ 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
Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: