Free cookie consent management tool by TermsFeed Policy Generator

Changeset 9244


Ignore:
Timestamp:
02/26/13 14:20:58 (11 years ago)
Author:
mkommend
Message:

#1961: Corrected bounds update in CMAMutator.

File:
1 edited

Legend:

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

    r9199 r9244  
    2020#endregion
    2121
     22using System;
    2223using HeuristicLab.Common;
    2324using HeuristicLab.Core;
     
    2829using HeuristicLab.Parameters;
    2930using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    30 using System;
    3131
    3232namespace HeuristicLab.Algorithms.CMAEvolutionStrategy {
     
    128128            if (!inRange && maxTries > 1) {
    129129              if (bounds[k % bounds.Rows, 0] > arx[i][k]) arx[i][k] = bounds[k % bounds.Rows, 0];
    130               else if (bounds[k % bounds.Rows, 1] < arx[i][k]) arx[i][k] = bounds[i % bounds.Rows, 1];
     130              else if (bounds[k % bounds.Rows, 1] < arx[i][k]) arx[i][k] = bounds[k % bounds.Rows, 1];
    131131            }
    132132          }
     
    153153            for (int k = 0; k < arx[0].Length; k++) {
    154154              if (bounds[k % bounds.Rows, 0] > arx[i][k]) arx[i][k] = bounds[k % bounds.Rows, 0];
    155               else if (bounds[k % bounds.Rows, 1] < arx[i][k]) arx[i][k] = bounds[i % bounds.Rows, 1];
     155              else if (bounds[k % bounds.Rows, 1] < arx[i][k]) arx[i][k] = bounds[k % bounds.Rows, 1];
    156156            }
    157157          }
Note: See TracChangeset for help on using the changeset viewer.