Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/21/10 01:13:49 (13 years ago)
Author:
cneumuel
Message:

#1215

  • added possibility to create all parameter combinations from a ParameterConfigurationTree and generate an experiment from them
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encoding/RangeConstraints/PercentValueRange.cs

    r5112 r5144  
    3232      return new DoubleValueRange(LowerBound, UpperBound, StepSize);
    3333    }
     34
     35    public override IEnumerable<PercentValue> GetCombinations() {
     36      var solutions = new List<PercentValue>();
     37      double value = ((int)Math.Round(LowerBound.Value / StepSize.Value, 0)) * StepSize.Value;
     38      if (value < LowerBound.Value) value += StepSize.Value;
     39
     40      while (value <= UpperBound.Value) {
     41        //yield return new PercentValue(value);
     42        solutions.Add(new PercentValue(value));
     43        value += StepSize.Value;
     44      }
     45      return solutions;
     46    }
    3447  }
    3548}
Note: See TracChangeset for help on using the changeset viewer.