Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/08/13 13:02:04 (11 years ago)
Author:
abeham
Message:

#2020: fixed index out of range in NormalDistributedRealVectorCreator

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Creators/NormalDistributedRealVectorCreator.cs

    r9265 r9301  
    2020#endregion
    2121
     22using System;
    2223using HeuristicLab.Common;
    2324using HeuristicLab.Core;
     
    2728using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2829using HeuristicLab.Random;
    29 using System;
    3030
    3131namespace HeuristicLab.Encodings.RealVectorEncoding {
     
    110110          do {
    111111            result[i] = mean[i] + sigma[i % sigma.Length] * nd.NextDouble();
    112             inRange = result[i] >= bounds[i % sigma.Length, 0] && result[i] < bounds[i % sigma.Length, 1];
     112            inRange = result[i] >= bounds[i % bounds.Rows, 0] && result[i] < bounds[i % bounds.Rows, 1];
    113113            count++;
    114114          } while (count < maximumTries && !inRange);
Note: See TracChangeset for help on using the changeset viewer.