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/Various/VariousInstanceProvider.cs

    r14186 r14305  
    2222using System;
    2323using System.Collections.Generic;
     24using HeuristicLab.Random;
    2425
    2526namespace HeuristicLab.Problems.Instances.DataAnalysis {
     
    3738      get { return ""; }
    3839    }
     40    public int Seed { get; private set; }
    3941
     42    public VariousInstanceProvider() : this((int)DateTime.Now.Ticks) { }
     43
     44    public VariousInstanceProvider(int seed) : base() {
     45      Seed = seed;
     46    }
    4047    public override IEnumerable<IDataDescriptor> GetDataDescriptors() {
    4148      List<IDataDescriptor> descriptorList = new List<IDataDescriptor>();
    42       descriptorList.Add(new BreimanOne());
    43       descriptorList.Add(new FriedmanOne());
    44       descriptorList.Add(new FriedmanTwo());
    45       descriptorList.Add(new PolyTen());
    46       descriptorList.Add(new SpatialCoevolution());
     49      var rand = new MersenneTwister((uint)Seed);
     50      descriptorList.Add(new BreimanOne(rand.Next()));
     51      descriptorList.Add(new FriedmanOne(rand.Next()));
     52      descriptorList.Add(new FriedmanTwo(rand.Next()));
     53      descriptorList.Add(new PolyTen(rand.Next()));
     54      descriptorList.Add(new SpatialCoevolution(rand.Next()));
    4755      return descriptorList;
    4856    }
Note: See TracChangeset for help on using the changeset viewer.