Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/23/16 12:57:27 (8 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/Korns/KornsFunctionFourteen.cs

    r14186 r14305  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HeuristicLab.Random;
    2526
    2627namespace HeuristicLab.Problems.Instances.DataAnalysis {
     
    4950    protected override int TestPartitionStart { get { return 10000; } }
    5051    protected override int TestPartitionEnd { get { return 20000; } }
     52    public int Seed { get; private set; }
    5153
     54    public KornsFunctionFourteen() : this((int)System.DateTime.Now.Ticks) {
     55    }
     56    public KornsFunctionFourteen(int seed) : base() {
     57      Seed = seed;
     58    }
    5259    protected override List<List<double>> GenerateValues() {
    5360      List<List<double>> data = new List<List<double>>();
     61      var rand = new MersenneTwister((uint)Seed);
    5462      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    55         data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50).ToList());
     63        data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, -50, 50).ToList());
    5664      }
    5765
Note: See TracChangeset for help on using the changeset viewer.