blob: 8bdeea35dde77e16ace76f36ba309670727290f1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
package stats
import (
"fmt"
)
// Prints each calculated statistic on a line with one tab preceding it
func (s *Stats) PrettyStats() string {
return fmt.Sprintf(`
Min: %.2f
Max: %.2f
Mean: %.2f
Variance: %.2f
Standard Deviation: %.2f
Skewness: %.2f
Kurtosis: %.2f
`, s.Min, s.Max, s.Mean(), s.Variance(), s.StandardDeviation(), s.Skewness(), s.Kurtosis())
}
// Returns a string containing all of the data within the struct
func (s *Stats) Internals() string {
return fmt.Sprintf("%#v", s)
}
|