diff --git a/algo/algo.go b/algo/algo.go index fb339bc..3351272 100644 --- a/algo/algo.go +++ b/algo/algo.go @@ -4,6 +4,7 @@ package algo import ( + "sort" "sync" "git.dotya.ml/wanderer/math-optim/bench" @@ -21,6 +22,14 @@ var meanStats = &stats.MeanStats{} var comparisonOfMeansPicList = &report.PicList{Algo: "Comparison of Means"} +// GetMeanStats returns a pointer of type stats.MeanStats to a sorted package +// global 'meanStats'. +func GetMeanStats() *stats.MeanStats { + sort.Sort(meanStats) + + return meanStats +} + // DoRandomSearch executes a search using the 'Random search' method. func DoRandomSearch(wg *sync.WaitGroup, m *sync.Mutex) { defer wg.Done()