go(de): add stats chan to the model
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
leo 2023-01-19 20:22:07 +01:00
parent 7e358b01af
commit 2e5bb5c538
Signed by: wanderer
SSH Key Fingerprint: SHA256:Dp8+iwKHSlrMEHzE3bJnPng70I7LEsa3IJXRH/U+idQ

@ -35,6 +35,8 @@ type JDE struct {
Population *Population
// BenchName is a name of the problem to optimise.
BenchName string
// ch is a channel for writing back computed results.
ch chan []stats.Stats
// initialised denotes the initialisation state of the struct.
initialised bool
}
@ -99,6 +101,7 @@ func (j *JDE) Init(generations, mutStrategy, adptScheme, np int, f, cr float64,
j.CR = cr
j.Dimensions = dimensions
j.BenchName = bench
j.ch = ch
j.initialised = true
pop := newPopulation(bench, j.NP)