fix(jDE): correct recombination w/ mutant
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
leo 2023-02-09 23:13:57 +01:00
parent f1fa67ab79
commit e006d104a9
Signed by: wanderer
SSH Key Fingerprint: SHA256:Dp8+iwKHSlrMEHzE3bJnPng70I7LEsa3IJXRH/U+idQ

@ -405,6 +405,8 @@ func (j *JDE) evolve(pop *Population, uniDist *distuv.Uniform) {
for k := 0; k < pop.Dimen; k++ { for k := 0; k < pop.Dimen; k++ {
if crossPoints[k] { if crossPoints[k] {
trial[k] = currentIndividual.CurX[k] trial[k] = currentIndividual.CurX[k]
} else {
trial[k] = mutant[k]
} }
} }