Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/22/11 10:56:48 (13 years ago)
Author:
cneumuel
Message:

#1215

  • reduced significance of NormalCrossovers
  • small fixes
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Operators/Manipulators/DoubleValue/UniformDoubleValueManipulator.cs

    r6017 r6038  
    1 using System;
    2 using System.Collections.Generic;
    3 using System.Linq;
    4 using System.Text;
     1using HeuristicLab.Common;
     2using HeuristicLab.Core;
     3using HeuristicLab.Data;
     4using HeuristicLab.Encodings.RealVectorEncoding;
    55using HeuristicLab.Operators;
    66using HeuristicLab.Optimization;
     7using HeuristicLab.Parameters;
    78using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    8 using HeuristicLab.Core;
    9 using HeuristicLab.Parameters;
    10 using HeuristicLab.Common;
    11 using HeuristicLab.Encodings.RealVectorEncoding;
    12 using HeuristicLab.Data;
    139
    1410namespace HeuristicLab.Problems.MetaOptimization {
     
    3632
    3733    public static void ApplyStatic(IRandom random, DoubleValue value, DoubleValueRange range) {
    38       bool ok = false;
    3934      var vector = new RealVector(1);
    4035      var bounds = new DoubleMatrix(1, 2);
     
    4338      double val = value.Value;
    4439
    45       while (!ok) {
     40      do {
    4641        vector[0] = val;
    4742        UniformOnePositionManipulator.Apply(random, vector, bounds);
    4843        value.Value = vector[0];
    4944        value.Value = range.ApplyStepSize(value.Value);
    50         ok = range.IsInRange(value.Value);
    51       }
     45      } while (!range.IsInRange(value.Value));
    5246    }
    5347  }
Note: See TracChangeset for help on using the changeset viewer.