go(de): get rid of fVect,crVect
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
leo 2023-01-20 23:36:35 +01:00
parent 3e78332869
commit cba6e62b50
Signed by: wanderer
SSH Key Fingerprint: SHA256:Dp8+iwKHSlrMEHzE3bJnPng70I7LEsa3IJXRH/U+idQ

View File

@ -26,10 +26,6 @@ type JDE struct {
F float64
// CR is the crossover probability constant.
CR float64
// fVect holds the F values in a slice.
fVect []float64
// crVect holds the CR values in a slice.
crVect []float64
// MutationStrategy selects the mutation strategy, i.e. the variant of the
// jDE algorithm (0..17), see mutationStrategies.go for more details.
MutationStrategy int
@ -111,17 +107,6 @@ func (j *JDE) Init(generations, benchMinIters, mutStrategy, adptScheme, np int,
j.BenchName = bench
j.ch = ch
fV := make([]float64, np)
crV := make([]float64, np)
for i := 0; i < np; i++ {
fV[i] = f
crV[i] = cr
}
j.fVect = fV
j.crVect = crV
j.initialised = true
}