Ignore:
Timestamp:
09/23/16 12:57:27 (3 years ago)
Author:
gkronber
Message:

#2371: merged r14228, r14229 from trunk to stable

Location:
stable
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Problems.Instances.DataAnalysis

  • stable/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Keijzer/KeijzerFunctionEleven.cs

    r14186 r14305  
    2424using System.Linq;
    2525using HeuristicLab.Common;
     26using HeuristicLab.Random;
    2627
    2728namespace HeuristicLab.Problems.Instances.DataAnalysis {
     
    4748    protected override int TestPartitionStart { get { return 20; } }
    4849    protected override int TestPartitionEnd { get { return 20 + (601 * 601); } }
     50    public int Seed { get; private set; }
    4951
     52    public KeijzerFunctionEleven() : this((int)System.DateTime.Now.Ticks) {
     53    }
     54    public KeijzerFunctionEleven(int seed) : base() {
     55      Seed = seed;
     56    }
    5057    protected override List<List<double>> GenerateValues() {
    5158      List<List<double>> data = new List<List<double>>();
     
    5461
    5562      var combinations = ValueGenerator.GenerateAllCombinationsOfValuesInLists(testData).ToList();
    56 
     63      var rand = new MersenneTwister((uint)Seed);
    5764      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    58         data.Add(ValueGenerator.GenerateUniformDistributedValues(20, -3, 3).ToList());
     65        data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), 20, -3, 3).ToList());
    5966        data[i].AddRange(combinations[i]);
    6067      }
Note: See TracChangeset for help on using the changeset viewer.