Changeset 14228 for trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Vladislavleva/SineCosineFunction.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/Vladislavleva/SineCosineFunction.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 30; } } 47 48 protected override int TestPartitionEnd { get { return 30 + (306 * 306); } } 49 public int Seed { get; } 48 50 51 public SineCosineFunction() : this((int)DateTime.Now.Ticks) { } 52 53 public SineCosineFunction(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 var combinations = ValueGenerator.GenerateAllCombinationsOfValuesInLists(testData).ToList<IEnumerable<double>>(); 54 61 62 var rand = new MersenneTwister((uint)Seed); 55 63 for (int i = 0; i < AllowedInputVariables.Count(); i++) { 56 data.Add(ValueGenerator.GenerateUniformDistributedValues( 30, 0.1, 5.9).ToList());64 data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), 30, 0.1, 5.9).ToList()); 57 65 data[i].AddRange(combinations[i]); 58 66 }
Note: See TracChangeset
for help on using the changeset viewer.