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