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/IntValueRange.cs

    r5112 r5144  
    3737      if (value.Value < this.LowerBound.Value) value.Value = this.LowerBound.Value;
    3838    }
     39
     40    public override IEnumerable<IntValue> GetCombinations() {
     41      var solutions = new List<IntValue>();
     42      int value = (this.LowerBound.Value / StepSize.Value) * StepSize.Value;
     43      if (value < this.LowerBound.Value) value += StepSize.Value;
     44
     45      while (value <= this.UpperBound.Value) {
     46        //yield return new IntValue(value);
     47        solutions.Add(new IntValue(value));
     48        value += this.StepSize.Value;
     49      }
     50      return solutions;
     51    }
    3952  }
    4053}
Note: See TracChangeset for help on using the changeset viewer.