Changeset 14228 for trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Keijzer/KeijzerFunctionFifteen.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/KeijzerFunctionFifteen.cs
r14185 r14228 24 24 using System.Linq; 25 25 using HeuristicLab.Common; 26 using HeuristicLab.Random; 26 27 27 28 namespace HeuristicLab.Problems.Instances.DataAnalysis { … … 46 47 protected override int TestPartitionStart { get { return 20; } } 47 48 protected override int TestPartitionEnd { get { return 20 + (601 * 601); } } 49 public int Seed { get; } 48 50 51 public KeijzerFunctionFifteen() : this((int)System.DateTime.Now.Ticks) { 52 } 53 public KeijzerFunctionFifteen(int seed) : base() { 54 Seed = seed; 55 } 49 56 protected override List<List<double>> GenerateValues() { 50 57 List<List<double>> data = new List<List<double>>(); … … 53 60 54 61 var combinations = ValueGenerator.GenerateAllCombinationsOfValuesInLists(testData).ToList(); 62 var rand = new MersenneTwister((uint)Seed); 55 63 56 64 for (int i = 0; i < AllowedInputVariables.Count(); i++) { 57 data.Add(ValueGenerator.GenerateUniformDistributedValues( 20, -3, 3).ToList());65 data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), 20, -3, 3).ToList()); 58 66 data[i].AddRange(combinations[i]); 59 67 }
Note: See TracChangeset
for help on using the changeset viewer.