mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 13:27:45 -07:00
MathUtil: Add Population (vs Sample) versions of Variance and StandardDeviation to RunningVariance.
This commit is contained in:
parent
960750003e
commit
1063c4e940
@ -135,8 +135,12 @@ public:
|
||||
|
||||
constexpr size_t Count() const { return m_running_mean.Count(); }
|
||||
constexpr T Mean() const { return m_running_mean.Mean(); }
|
||||
|
||||
constexpr T Variance() const { return m_variance / (Count() - 1); }
|
||||
constexpr T StandardDeviation() const { return std::sqrt(Variance()); }
|
||||
T StandardDeviation() const { return std::sqrt(Variance()); }
|
||||
|
||||
constexpr T PopulationVariance() const { return m_variance / Count(); }
|
||||
T PopulationStandardDeviation() const { return std::sqrt(PopulationVariance()); }
|
||||
|
||||
private:
|
||||
RunningMean<T> m_running_mean;
|
||||
|
Loading…
Reference in New Issue
Block a user