Changeset 14228 for trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Nguyen/NguyenFunctionNine.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/Nguyen/NguyenFunctionNine.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 20; } } 46 47 protected override int TestPartitionEnd { get { return 1020; } } 48 public int Seed { get; } 47 49 50 public NguyenFunctionNine() : this((int)System.DateTime.Now.Ticks) { } 51 public NguyenFunctionNine(int seed) : base() { 52 Seed = seed; 53 } 48 54 protected override List<List<double>> GenerateValues() { 49 55 List<List<double>> data = new List<List<double>>(); 50 data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, 0, 1).ToList()); 51 data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, 0, 1).ToList()); 56 var rand = new MersenneTwister((uint)Seed); 57 58 data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 0, 1).ToList()); 59 data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 0, 1).ToList()); 52 60 53 61 double x, y;
Note: See TracChangeset
for help on using the changeset viewer.