go(randomSearch): properly size the vals slice
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
surtur 2022-06-17 22:14:56 +02:00
parent 53a5de92dd
commit f1b3c1c90f
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

@ -48,7 +48,7 @@ func genValsRandomSearch(dimens uint, vals []float64, uniform *distuv.Uniform) {
// which is relevant to the objective function. // which is relevant to the objective function.
// nolint // nolint
func singleRandomSearch(dimens uint, f string, min, max float64) ([]float64, float64) { func singleRandomSearch(dimens uint, f string, min, max float64) ([]float64, float64) {
var vals []float64 vals := make([]float64, dimens)
var res float64 var res float64