Free cookie consent management tool by TermsFeed Policy Generator

source: branches/3043-Regression-Instances-For-Scaling/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/ScalingProblems/ScalingProblemInstanceProvider.cs @ 18060

Last change on this file since 18060 was 17399, checked in by gkronber, 5 years ago

#3043: applied patch prepared by djoedick

File size: 2.1 KB
Line 
1#region License Information
2/* HeuristicLab
3 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
4 *
5 * This file is part of HeuristicLab.
6 *
7 * HeuristicLab is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * HeuristicLab is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
19 */
20#endregion
21
22using System;
23using System.Collections.Generic;
24using HeuristicLab.Random;
25
26namespace HeuristicLab.Problems.Instances.DataAnalysis
27{
28  public class ScalingProblemInstanceProvider : ArtificialRegressionInstanceProvider
29  {
30    public override string Name
31    {
32      get { return "Scaling Benchmark Problems"; }
33    }
34    public override string Description
35    {
36      get { return ""; }
37    }
38    public override Uri WebLink
39    {
40      get { return new Uri("http://www.x.com"); }
41    }
42    public override string ReferencePublication
43    {
44      get { return ""; }
45    }
46
47    public int Seed { get; private set; }
48
49    public ScalingProblemInstanceProvider() : this((int)DateTime.Now.Ticks) { }
50    public ScalingProblemInstanceProvider(int seed) : base()
51    {
52      Seed = seed;
53    }
54
55    public override IEnumerable<IDataDescriptor> GetDataDescriptors()
56    {
57      List<IDataDescriptor> descriptorList = new List<IDataDescriptor>();
58      var rand = new MersenneTwister((uint)Seed);
59      descriptorList.Add(new ScalingProblem1(rand.Next()));
60      descriptorList.Add(new ScalingProblem2(rand.Next()));
61      descriptorList.Add(new ScalingProblem3(rand.Next()));
62      descriptorList.Add(new ScalingProblem4(rand.Next()));
63      descriptorList.Add(new ScalingProblem5(rand.Next()));
64      return descriptorList;
65    }
66  }
67}
Note: See TracBrowser for help on using the repository browser.