go(algo): use Dimensions slice from the bench pkg
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
7742642e14
commit
6db4b60875
@ -30,7 +30,7 @@ func DoRandomSearch(wg *sync.WaitGroup, m *sync.Mutex) {
|
||||
|
||||
for i := range algoStats {
|
||||
// ng y'all.
|
||||
go RandomSearchNG(10000, 30, []int{5, 10, 20}, bench.FuncNames[i], ch)
|
||||
go RandomSearchNG(10000, 30, bench.Dimensions, bench.FuncNames[i], ch)
|
||||
}
|
||||
|
||||
// get results.
|
||||
@ -77,7 +77,7 @@ func DoStochasticHillClimbing(wg *sync.WaitGroup, m *sync.Mutex) {
|
||||
ch := make(chan []stats.Stats, funcCount)
|
||||
|
||||
for i := range algoStats {
|
||||
go HillClimb(10000, 30, []int{5, 10, 20}, bench.FuncNames[i], ch)
|
||||
go HillClimb(10000, 30, bench.Dimensions, bench.FuncNames[i], ch)
|
||||
}
|
||||
|
||||
// get results.
|
||||
|
@ -21,7 +21,7 @@ const (
|
||||
|
||||
var (
|
||||
// Dimensions to compute for (spatial complexity..?).
|
||||
Dimensions = []uint{5, 10, 20}
|
||||
Dimensions = []int{5, 10, 20}
|
||||
|
||||
// SchwefelParams is a struct holding the min, max allowed value of inputs
|
||||
// passed to the Schwefel function.
|
||||
|
Loading…
Reference in New Issue
Block a user