Changeset 14228 for trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Various/PolyTen.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/PolyTen.cs
r14185 r14228 23 23 using System.Collections.Generic; 24 24 using System.Linq; 25 using HeuristicLab.Random; 25 26 26 27 namespace HeuristicLab.Problems.Instances.DataAnalysis { … … 45 46 protected override int TestPartitionStart { get { return 250; } } 46 47 protected override int TestPartitionEnd { get { return 500; } } 48 public int Seed { get; } 47 49 50 public PolyTen() : this((int)DateTime.Now.Ticks) { } 51 52 public PolyTen(int seed) : base() { 53 Seed = seed; 54 } 48 55 protected override List<List<double>> GenerateValues() { 49 56 List<List<double>> data = new List<List<double>>(); 57 var rand = new MersenneTwister((uint)Seed); 58 50 59 for (int i = 0; i < AllowedInputVariables.Count(); i++) { 51 data.Add(ValueGenerator.GenerateUniformDistributedValues( TestPartitionEnd, -1, 1).ToList());60 data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, -1, 1).ToList()); 52 61 } 53 62
Note: See TracChangeset
for help on using the changeset viewer.