Free cookie consent management tool by TermsFeed Policy Generator

Changeset 9245


Ignore:
Timestamp:
02/26/13 15:49:02 (11 years ago)
Author:
mkommend
Message:

#1961: Corrected another bug regarding the bounds check in the CMAMutator.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/CMAES/HeuristicLab.Algorithms.CMAEvolutionStrategy/3.3/CMAOperators/CMAMutator.cs

    r9244 r9245  
    123123            do {
    124124              arx[i][k] = xmean[k] + sp.Sigma.Value * sp.D[k] * alglib.hqrndnormal(state);
    125               inRange = bounds[k % bounds.Rows, 0] <= arx[i][k] || arx[i][k] <= bounds[k % bounds.Rows, 1];
     125              inRange = bounds[k % bounds.Rows, 0] <= arx[i][k] && arx[i][k] <= bounds[k % bounds.Rows, 1];
    126126              if (!inRange) tries++;
    127127            } while (!inRange && tries < maxTries);
Note: See TracChangeset for help on using the changeset viewer.