Changeset 14228 for trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Various/VariousInstanceProvider.cs
- Timestamp:
- 08/02/16 18:09:47 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Various/VariousInstanceProvider.cs
r14185 r14228 22 22 using System; 23 23 using System.Collections.Generic; 24 using HeuristicLab.Random; 24 25 25 26 namespace HeuristicLab.Problems.Instances.DataAnalysis { … … 37 38 get { return ""; } 38 39 } 40 public int Seed { get; } 39 41 42 public VariousInstanceProvider() : this((int)DateTime.Now.Ticks) { } 43 44 public VariousInstanceProvider(int seed) : base() { 45 Seed = seed; 46 } 40 47 public override IEnumerable<IDataDescriptor> GetDataDescriptors() { 41 48 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())); 47 55 return descriptorList; 48 56 }
Note: See TracChangeset
for help on using the changeset viewer.