Free cookie consent management tool by TermsFeed Policy Generator

Changeset 470


Ignore:
Timestamp:
08/08/08 21:14:00 (16 years ago)
Author:
gkronber
Message:

fixed the range for uniform random numbers in the initializer for index and sample-offset of variable (necessary after fixing #238) (ticket #237)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Functions/Variable.cs

    r468 r470  
    8888      UniformRandomizer indexRandomizer = new UniformRandomizer();
    8989      indexRandomizer.Min = minIndex;
    90       indexRandomizer.Max = maxIndex;
     90      indexRandomizer.Max = maxIndex + 1; // uniform randomizer generates numbers in the range [min, max[
    9191      indexRandomizer.GetVariableInfo("Value").ActualName = INDEX;
    9292      indexRandomizer.Name = "Index Randomizer";
     
    9898      UniformRandomizer offsetRandomizer = new UniformRandomizer();
    9999      offsetRandomizer.Min = minOffset;
    100       offsetRandomizer.Max = maxOffset;
     100      offsetRandomizer.Max = maxOffset + 1;
    101101      offsetRandomizer.GetVariableInfo("Value").ActualName = OFFSET;
    102102      offsetRandomizer.Name = "Offset Randomizer";
     
    124124      UniformRandomizer indexRandomizer = new UniformRandomizer();
    125125      indexRandomizer.Min = minIndex;
    126       indexRandomizer.Max = maxIndex;
     126      indexRandomizer.Max = maxIndex + 1;
    127127      indexRandomizer.GetVariableInfo("Value").ActualName = INDEX;
    128128      indexRandomizer.Name = "Index Randomizer";
Note: See TracChangeset for help on using the changeset viewer.