go(algo): add GetMeanStats func
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
surtur 2022-08-03 21:25:37 +02:00
parent a328c9619e
commit b4c9ebcf5a
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

@ -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()