diff --git a/bench/cec2020/benchFunctions.go b/bench/cec2020/benchFunctions.go index 9359ea6..1ae5146 100644 --- a/bench/cec2020/benchFunctions.go +++ b/bench/cec2020/benchFunctions.go @@ -217,7 +217,7 @@ func Composition2(x []float64) float64 { var sum float64 - var weights []float64 + weights := make([]float64, len(funcs)) for i := range funcs { wi := getWeight(x, o, sigma[i], fnx) @@ -259,7 +259,7 @@ func Composition3(x []float64) float64 { var sum float64 - var weights []float64 + weights := make([]float64, len(funcs)) for i := range funcs { wi := getWeight(x, o, sigma[i], fnx)