Grok 12.0.1
Public Types | Public Member Functions | Private Attributes | List of all members
hwy::Stats Class Reference

#include <stats.h>

Public Types

enum  {
  kNoCount = 1 , kNoMeanSD = 2 , kNoMinMax = 4 , kNoSkewKurt = 8 ,
  kNoGeomean = 16
}
 

Public Member Functions

 Stats ()
 
void Notify (const float x)
 
void Assimilate (const Stats &other)
 
int64_t Count () const
 
float Min () const
 
float Max () const
 
double GeometricMean () const
 
double Mean () const
 
double SampleVariance () const
 
double Variance () const
 
double StandardDeviation () const
 
double SampleSkewness () const
 
double Skewness () const
 
double SampleKurtosis () const
 
double Kurtosis () const
 
double Mu1 () const
 
double Mu2 () const
 
double Mu3 () const
 
double Mu4 () const
 
std::string ToString (int exclude=0) const
 
void Reset ()
 

Private Attributes

int64_t n_
 
float min_
 
float max_
 
double product_
 
double m1_
 
double m2_
 
double m3_
 
double m4_
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
kNoCount 
kNoMeanSD 
kNoMinMax 
kNoSkewKurt 
kNoGeomean 

Constructor & Destructor Documentation

◆ Stats()

hwy::Stats::Stats ( )
inline

References Reset().

Member Function Documentation

◆ Assimilate()

void hwy::Stats::Assimilate ( const Stats & other)

◆ Count()

int64_t hwy::Stats::Count ( ) const
inline

References n_.

◆ GeometricMean()

double hwy::Stats::GeometricMean ( ) const
inline

References n_, and product_.

◆ Kurtosis()

double hwy::Stats::Kurtosis ( ) const
inline

References n_, and SampleKurtosis().

◆ Max()

float hwy::Stats::Max ( ) const
inline

References max_.

◆ Mean()

double hwy::Stats::Mean ( ) const
inline

References m1_.

◆ Min()

float hwy::Stats::Min ( ) const
inline

References min_.

◆ Mu1()

double hwy::Stats::Mu1 ( ) const
inline

References m1_.

◆ Mu2()

double hwy::Stats::Mu2 ( ) const
inline

References m2_, and n_.

◆ Mu3()

double hwy::Stats::Mu3 ( ) const
inline

References m3_, and n_.

◆ Mu4()

double hwy::Stats::Mu4 ( ) const
inline

References m4_, and n_.

◆ Notify()

void hwy::Stats::Notify ( const float x)
inline

References m1_, m2_, m3_, m4_, max_, min_, n_, and product_.

◆ Reset()

void hwy::Stats::Reset ( )
inline

◆ SampleKurtosis()

double hwy::Stats::SampleKurtosis ( ) const
inline

References m2_, m4_, and n_.

Referenced by Kurtosis().

◆ SampleSkewness()

double hwy::Stats::SampleSkewness ( ) const
inline

References m2_, m3_, and n_.

Referenced by Skewness().

◆ SampleVariance()

double hwy::Stats::SampleVariance ( ) const
inline

References m2_, and n_.

◆ Skewness()

double hwy::Stats::Skewness ( ) const
inline

References n_, and SampleSkewness().

◆ StandardDeviation()

double hwy::Stats::StandardDeviation ( ) const
inline

References Variance().

◆ ToString()

std::string hwy::Stats::ToString ( int exclude = 0) const

◆ Variance()

double hwy::Stats::Variance ( ) const
inline

References m2_, and n_.

Referenced by StandardDeviation().

Member Data Documentation

◆ m1_

double hwy::Stats::m1_
private

Referenced by Mean(), Mu1(), Notify(), and Reset().

◆ m2_

double hwy::Stats::m2_
private

◆ m3_

double hwy::Stats::m3_
private

Referenced by Mu3(), Notify(), Reset(), and SampleSkewness().

◆ m4_

double hwy::Stats::m4_
private

Referenced by Mu4(), Notify(), Reset(), and SampleKurtosis().

◆ max_

float hwy::Stats::max_
private

Referenced by Max(), Notify(), and Reset().

◆ min_

float hwy::Stats::min_
private

Referenced by Min(), Notify(), and Reset().

◆ n_

int64_t hwy::Stats::n_
private

◆ product_

double hwy::Stats::product_
private

Referenced by GeometricMean(), Notify(), and Reset().


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