go(algo): sort the mean vals in algo funcs
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
surtur 2022-07-20 17:16:44 +02:00
parent 109ce82f3e
commit 9801554eb5
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D
2 changed files with 6 additions and 0 deletions

@ -7,6 +7,7 @@ import (
"fmt"
"log"
"os"
"sort"
"time"
"git.dotya.ml/wanderer/math-optim/bench"
@ -184,6 +185,8 @@ func RandomSearchNG(maxFES, benchMinIters int, theD []int, benchFunc string, ch
rsMeans.Means = append(rsMeans.Means, *dimXMean)
}
sort.Sort(rsMeans)
// export AlgoMeans.
mu.Lock()
meanStats.AlgoMeans = append(meanStats.AlgoMeans, *rsMeans)

@ -8,6 +8,7 @@ import (
"log"
"math"
"os"
"sort"
"time"
"git.dotya.ml/wanderer/math-optim/bench"
@ -301,6 +302,8 @@ func HillClimb(maxFES, benchMinIters int, theD []int, benchFunc string, ch chan
shcMeans.Means = append(shcMeans.Means, *dimXMean)
}
sort.Sort(shcMeans)
// export AlgoMeans.
mu.Lock()
meanStats.AlgoMeans = append(meanStats.AlgoMeans, *shcMeans)