Documentation ¶
Index ¶
- func DownloadAllStaminaDatasets(directory string)
- func Factorial(n int) int
- func FileExists(filePath string) bool
- func Max(x, y int) int
- func MaxSlice(slice []int) int
- func Min(x, y int) int
- func RandomGeometricProbability(mean float64) int
- func SumMap(currentMap map[int]int, key bool) int
- func SumSlice(slice []int) int
- type StatsTracker
- func (statsTracker *StatsTracker) Add(value float64)
- func (statsTracker *StatsTracker) AddInt(intValue int)
- func (statsTracker StatsTracker) Max() float64
- func (statsTracker StatsTracker) Mean() float64
- func (statsTracker StatsTracker) Min() float64
- func (statsTracker StatsTracker) PopulationStandardDev() float64
- func (statsTracker StatsTracker) PopulationVariance() float64
- func (statsTracker StatsTracker) SampleStandardDev() float64
- func (statsTracker StatsTracker) SampleVariance() float64
- type Void
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadAllStaminaDatasets ¶
func DownloadAllStaminaDatasets(directory string)
DownloadAllStaminaDatasets downloads all of the stamina datasets to a given directory.
func RandomGeometricProbability ¶
RandomGeometricProbability returns a random geometrically distributed integer using a mean value.
Types ¶
type StatsTracker ¶
type StatsTracker struct {
// contains filtered or unexported fields
}
StatsTracker struct is used to keep track of minimum, maximum, average, variance and standard deviation values given a sequence of values. Mean and variance calculation is done using Welford's online algorithm.
func NewStatsTracker ¶
func NewStatsTracker() StatsTracker
NewStatsTracker returns an empty StatsTracker struct.
func (*StatsTracker) Add ¶
func (statsTracker *StatsTracker) Add(value float64)
Add adds a float value to the StatsTracker struct.
func (*StatsTracker) AddInt ¶
func (statsTracker *StatsTracker) AddInt(intValue int)
AddInt adds an integer value to the StatsTracker struct.
func (StatsTracker) Max ¶
func (statsTracker StatsTracker) Max() float64
Max returns the maximum value within the StatsTracker struct.
func (StatsTracker) Mean ¶
func (statsTracker StatsTracker) Mean() float64
Mean returns the average value within the StatsTracker struct.
func (StatsTracker) Min ¶
func (statsTracker StatsTracker) Min() float64
Min returns the minimum value within the StatsTracker struct.
func (StatsTracker) PopulationStandardDev ¶
func (statsTracker StatsTracker) PopulationStandardDev() float64
PopulationStandardDev returns the population standard deviation value within the StatsTracker struct.
func (StatsTracker) PopulationVariance ¶
func (statsTracker StatsTracker) PopulationVariance() float64
PopulationVariance returns the population variance value within the StatsTracker struct.
func (StatsTracker) SampleStandardDev ¶
func (statsTracker StatsTracker) SampleStandardDev() float64
SampleStandardDev returns the sample standard deviation value within the StatsTracker struct.
func (StatsTracker) SampleVariance ¶
func (statsTracker StatsTracker) SampleVariance() float64
SampleVariance returns the sample variance value within the StatsTracker struct.