Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/02/16 18:09:47 (8 years ago)
Author:
gkronber
Message:

#2371: added constructors to allow specification of random seeds for randomly generated regression problem instances (primarily for unit tests)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Nguyen/NguyenFunctionOne.cs

    r14185 r14228  
    4545    protected override int TestPartitionStart { get { return 20; } }
    4646    protected override int TestPartitionEnd { get { return 520; } }
     47    public int Seed { get; }
    4748
     49    public NguyenFunctionOne() : this((int)System.DateTime.Now.Ticks) { }
     50    public NguyenFunctionOne(int seed) : base() {
     51      Seed = seed;
     52    }
    4853    protected override List<List<double>> GenerateValues() {
    4954      List<List<double>> data = new List<List<double>>();
    50       data.Add(ValueGenerator.GenerateUniformDistributedValues(520, -1, 1).ToList());
     55      data.Add(ValueGenerator.GenerateUniformDistributedValues(Seed, 520, -1, 1).ToList());
    5156
    5257      double x;
Note: See TracChangeset for help on using the changeset viewer.