Changeset 14305 for stable/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Korns/KornsFunctionFourteen.cs
- Timestamp:
- 09/23/16 12:57:27 (8 years ago)
- Location:
- stable
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk/sources merged: 14228-14229
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Problems.Instances.DataAnalysis
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis merged: 14228-14229
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Korns/KornsFunctionFourteen.cs
r14186 r14305 23 23 using System.Collections.Generic; 24 24 using System.Linq; 25 using HeuristicLab.Random; 25 26 26 27 namespace HeuristicLab.Problems.Instances.DataAnalysis { … … 49 50 protected override int TestPartitionStart { get { return 10000; } } 50 51 protected override int TestPartitionEnd { get { return 20000; } } 52 public int Seed { get; private set; } 51 53 54 public KornsFunctionFourteen() : this((int)System.DateTime.Now.Ticks) { 55 } 56 public KornsFunctionFourteen(int seed) : base() { 57 Seed = seed; 58 } 52 59 protected override List<List<double>> GenerateValues() { 53 60 List<List<double>> data = new List<List<double>>(); 61 var rand = new MersenneTwister((uint)Seed); 54 62 for (int i = 0; i < AllowedInputVariables.Count(); i++) { 55 data.Add(ValueGenerator.GenerateUniformDistributedValues( TestPartitionEnd, -50, 50).ToList());63 data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, -50, 50).ToList()); 56 64 } 57 65
Note: See TracChangeset
for help on using the changeset viewer.