Changeset 7698


Ignore:
Timestamp:
04/03/12 09:29:07 (7 years ago)
Author:
sforsten
Message:

#1784:

  • ProblemInstanceProvider are sorted now
  • the return values of ValueGenerator have been changed to !IEnumerable
  • changes have been applied to classes which are using the ValueGenerator
  • change of the cast in ProblemInstanceProviderViewGeneric and !importButton.Enable is set now in SetEnabledStateOfControls
Location:
branches/ProblemInstancesRegressionAndClassification
Files:
48 edited

Legend:

Unmodified
Added
Removed
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Keijzer/KeijzerFunctionEight.cs

    r7682 r7698  
    2222using System;
    2323using System.Collections.Generic;
     24using System.Linq;
    2425
    2526namespace HeuristicLab.Problems.Instances.Regression {
     
    4849    protected override List<List<double>> GenerateValues() {
    4950      List<List<double>> data = new List<List<double>>();
    50       data.Add(ValueGenerator.GenerateSteps(1, 100, 1));
     51      data.Add(ValueGenerator.GenerateSteps(1, 100, 1).ToList());
    5152      data[0].AddRange(ValueGenerator.GenerateSteps(1, 100, 0.1));
    5253
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Keijzer/KeijzerFunctionFifteen.cs

    r7682 r7698  
    5151      List<List<double>> data = new List<List<double>>();
    5252      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    53         data.Add(ValueGenerator.GenerateUniformDistributedValues(5000, -3, 3));
     53        data.Add(ValueGenerator.GenerateUniformDistributedValues(5000, -3, 3).ToList());
    5454      }
    5555
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Keijzer/KeijzerFunctionFour.cs

    r7682 r7698  
    2222using System;
    2323using System.Collections.Generic;
     24using System.Linq;
    2425
    2526namespace HeuristicLab.Problems.Instances.Regression {
     
    4748    protected override List<List<double>> GenerateValues() {
    4849      List<List<double>> data = new List<List<double>>();
    49       data.Add(ValueGenerator.GenerateSteps(-1, 1, 0.1));
     50      data.Add(ValueGenerator.GenerateSteps(-1, 1, 0.1).ToList());
    5051      data[0].AddRange(ValueGenerator.GenerateSteps(-1, 1, 0.001));
    5152
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Keijzer/KeijzerFunctionSeven.cs

    r7682 r7698  
    4848    protected override List<List<double>> GenerateValues() {
    4949      List<List<double>> data = new List<List<double>>();
    50       data.Add(ValueGenerator.GenerateSteps(1, 50, 1));
     50      data.Add(ValueGenerator.GenerateSteps(1, 50, 1).ToList());
    5151      data[0].AddRange(ValueGenerator.GenerateSteps(1, 120, 1));
    5252
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Keijzer/KeijzerFunctionSix.cs

    r7682 r7698  
    2222using System;
    2323using System.Collections.Generic;
     24using System.Linq;
    2425
    2526namespace HeuristicLab.Problems.Instances.Regression {
     
    4748    protected override List<List<double>> GenerateValues() {
    4849      List<List<double>> data = new List<List<double>>();
    49       data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -1, 1));
    50       data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, 1, 2));
    51       data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -1, 1));
     50      data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -1, 1).ToList());
     51      data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, 1, 2).ToList());
     52      data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -1, 1).ToList());
    5253
    5354      double x, y, z;
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Keijzer/KeijzerFunctionSixteen.cs

    r7682 r7698  
    5151      List<List<double>> data = new List<List<double>>();
    5252      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    53         data.Add(ValueGenerator.GenerateUniformDistributedValues(5000, -3, 3));
     53        data.Add(ValueGenerator.GenerateUniformDistributedValues(5000, -3, 3).ToList());
    5454      }
    5555
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Keijzer/KeijzerFunctionThirteen.cs

    r7682 r7698  
    5151      List<List<double>> data = new List<List<double>>();
    5252      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    53         data.Add(ValueGenerator.GenerateUniformDistributedValues(5000, -3, 3));
     53        data.Add(ValueGenerator.GenerateUniformDistributedValues(5000, -3, 3).ToList());
    5454      }
    5555
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Keijzer/KeijzerFunctionTwelve.cs

    r7682 r7698  
    5151      List<List<double>> data = new List<List<double>>();
    5252      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    53         data.Add(ValueGenerator.GenerateUniformDistributedValues(5000, -3, 3));
     53        data.Add(ValueGenerator.GenerateUniformDistributedValues(5000, -3, 3).ToList());
    5454      }
    5555
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Korns/KornsFunctionEight.cs

    r7682 r7698  
    5555      List<List<double>> data = new List<List<double>>();
    5656      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    57         data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, 0, 50));
     57        data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, 0, 50).ToList());
    5858      }
    5959
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Korns/KornsFunctionEleven.cs

    r7682 r7698  
    5454      List<List<double>> data = new List<List<double>>();
    5555      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    56         data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50));
     56        data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50).ToList());
    5757      }
    5858
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Korns/KornsFunctionFive.cs

    r7682 r7698  
    5555      List<List<double>> data = new List<List<double>>();
    5656      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    57         data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, 0, 50));
     57        data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, 0, 50).ToList());
    5858      }
    5959
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Korns/KornsFunctionFiveteen.cs

    r7682 r7698  
    5555      List<List<double>> data = new List<List<double>>();
    5656      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    57         data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, 0, 50));
     57        data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, 0, 50).ToList());
    5858      }
    5959
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Korns/KornsFunctionFour.cs

    r7682 r7698  
    5454      List<List<double>> data = new List<List<double>>();
    5555      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    56         data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50));
     56        data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50).ToList());
    5757      }
    5858
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Korns/KornsFunctionFourteen.cs

    r7682 r7698  
    5454      List<List<double>> data = new List<List<double>>();
    5555      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    56         data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50));
     56        data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50).ToList());
    5757      }
    5858
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Korns/KornsFunctionNine.cs

    r7682 r7698  
    5555      List<List<double>> data = new List<List<double>>();
    5656      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    57         data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, 0, 50));
     57        data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, 0, 50).ToList());
    5858      }
    5959
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Korns/KornsFunctionOne.cs

    r7682 r7698  
    5454      List<List<double>> data = new List<List<double>>();
    5555      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    56         data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50));
     56        data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50).ToList());
    5757      }
    5858
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Korns/KornsFunctionSeven.cs

    r7682 r7698  
    5454      List<List<double>> data = new List<List<double>>();
    5555      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    56         data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50));
     56        data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50).ToList());
    5757      }
    5858
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Korns/KornsFunctionSix.cs

    r7682 r7698  
    5555      List<List<double>> data = new List<List<double>>();
    5656      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    57         data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, 0, 50));
     57        data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, 0, 50).ToList());
    5858      }
    5959
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Korns/KornsFunctionTen.cs

    r7682 r7698  
    5454      List<List<double>> data = new List<List<double>>();
    5555      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    56         data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50));
     56        data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50).ToList());
    5757      }
    5858
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Korns/KornsFunctionThirteen.cs

    r7682 r7698  
    5454      List<List<double>> data = new List<List<double>>();
    5555      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    56         data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50));
     56        data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50).ToList());
    5757      }
    5858
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Korns/KornsFunctionThree.cs

    r7682 r7698  
    5454      List<List<double>> data = new List<List<double>>();
    5555      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    56         data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50));
     56        data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50).ToList());
    5757      }
    5858
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Korns/KornsFunctionTwelve.cs

    r7682 r7698  
    5454      List<List<double>> data = new List<List<double>>();
    5555      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    56         data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50));
     56        data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50).ToList());
    5757      }
    5858
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Korns/KornsFunctionTwo.cs

    r7682 r7698  
    5454      List<List<double>> data = new List<List<double>>();
    5555      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    56         data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50));
     56        data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50).ToList());
    5757      }
    5858
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Nguyen/NguyenFunctionEight.cs

    r7682 r7698  
    2222using System;
    2323using System.Collections.Generic;
     24using System.Linq;
    2425
    2526namespace HeuristicLab.Problems.Instances.Regression {
     
    4748    protected override List<List<double>> GenerateValues() {
    4849      List<List<double>> data = new List<List<double>>();
    49       data.Add(ValueGenerator.GenerateUniformDistributedValues(500, 0, 4));
     50      data.Add(ValueGenerator.GenerateUniformDistributedValues(500, 0, 4).ToList());
    5051
    5152      double x;
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Nguyen/NguyenFunctionEleven.cs

    r7682 r7698  
    2222using System;
    2323using System.Collections.Generic;
     24using System.Linq;
    2425
    2526namespace HeuristicLab.Problems.Instances.Regression {
     
    4748    protected override List<List<double>> GenerateValues() {
    4849      List<List<double>> data = new List<List<double>>();
    49       data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, 0, 1));
    50       data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, 0, 1));
     50      data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, 0, 1).ToList());
     51      data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, 0, 1).ToList());
    5152
    5253      double x, y;
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Nguyen/NguyenFunctionFive.cs

    r7682 r7698  
    2222using System;
    2323using System.Collections.Generic;
     24using System.Linq;
    2425
    2526namespace HeuristicLab.Problems.Instances.Regression {
     
    4748    protected override List<List<double>> GenerateValues() {
    4849      List<List<double>> data = new List<List<double>>();
    49       data.Add(ValueGenerator.GenerateUniformDistributedValues(500, -1, 1));
     50      data.Add(ValueGenerator.GenerateUniformDistributedValues(500, -1, 1).ToList());
    5051
    5152      double x;
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Nguyen/NguyenFunctionFour.cs

    r7682 r7698  
    2222using System;
    2323using System.Collections.Generic;
     24using System.Linq;
    2425
    2526namespace HeuristicLab.Problems.Instances.Regression {
     
    4748    protected override List<List<double>> GenerateValues() {
    4849      List<List<double>> data = new List<List<double>>();
    49       data.Add(ValueGenerator.GenerateUniformDistributedValues(500, -1, 1));
     50      data.Add(ValueGenerator.GenerateUniformDistributedValues(500, -1, 1).ToList());
    5051
    5152      double x;
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Nguyen/NguyenFunctionNine.cs

    r7682 r7698  
    2222using System;
    2323using System.Collections.Generic;
     24using System.Linq;
    2425
    2526namespace HeuristicLab.Problems.Instances.Regression {
     
    4748    protected override List<List<double>> GenerateValues() {
    4849      List<List<double>> data = new List<List<double>>();
    49       data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, 0, 1));
    50       data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, 0, 1));
     50      data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, 0, 1).ToList());
     51      data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, 0, 1).ToList());
    5152
    5253      double x, y;
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Nguyen/NguyenFunctionOne.cs

    r7682 r7698  
    2222using System;
    2323using System.Collections.Generic;
     24using System.Linq;
    2425
    2526namespace HeuristicLab.Problems.Instances.Regression {
     
    4748    protected override List<List<double>> GenerateValues() {
    4849      List<List<double>> data = new List<List<double>>();
    49       data.Add(ValueGenerator.GenerateUniformDistributedValues(500, -1, 1));
     50      data.Add(ValueGenerator.GenerateUniformDistributedValues(500, -1, 1).ToList());
    5051
    5152      double x;
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Nguyen/NguyenFunctionSeven.cs

    r7682 r7698  
    2222using System;
    2323using System.Collections.Generic;
     24using System.Linq;
    2425
    2526namespace HeuristicLab.Problems.Instances.Regression {
     
    4748    protected override List<List<double>> GenerateValues() {
    4849      List<List<double>> data = new List<List<double>>();
    49       data.Add(ValueGenerator.GenerateUniformDistributedValues(500, 0, 2));
     50      data.Add(ValueGenerator.GenerateUniformDistributedValues(500, 0, 2).ToList());
    5051
    5152      double x;
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Nguyen/NguyenFunctionSix.cs

    r7682 r7698  
    2222using System;
    2323using System.Collections.Generic;
     24using System.Linq;
    2425
    2526namespace HeuristicLab.Problems.Instances.Regression {
     
    4748    protected override List<List<double>> GenerateValues() {
    4849      List<List<double>> data = new List<List<double>>();
    49       data.Add(ValueGenerator.GenerateUniformDistributedValues(500, -1, 1));
     50      data.Add(ValueGenerator.GenerateUniformDistributedValues(500, -1, 1).ToList());
    5051
    5152      double x;
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Nguyen/NguyenFunctionTen.cs

    r7682 r7698  
    2222using System;
    2323using System.Collections.Generic;
     24using System.Linq;
    2425
    2526namespace HeuristicLab.Problems.Instances.Regression {
     
    4748    protected override List<List<double>> GenerateValues() {
    4849      List<List<double>> data = new List<List<double>>();
    49       data.Add(ValueGenerator.GenerateUniformDistributedValues(1000, 0, 1));
    50       data.Add(ValueGenerator.GenerateUniformDistributedValues(1000, 0, 1));
     50      data.Add(ValueGenerator.GenerateUniformDistributedValues(1000, 0, 1).ToList());
     51      data.Add(ValueGenerator.GenerateUniformDistributedValues(1000, 0, 1).ToList());
    5152
    5253      double x, y;
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Nguyen/NguyenFunctionThree.cs

    r7682 r7698  
    2222using System;
    2323using System.Collections.Generic;
     24using System.Linq;
    2425
    2526namespace HeuristicLab.Problems.Instances.Regression {
     
    4748    protected override List<List<double>> GenerateValues() {
    4849      List<List<double>> data = new List<List<double>>();
    49       data.Add(ValueGenerator.GenerateUniformDistributedValues(500, -1, 1));
     50      data.Add(ValueGenerator.GenerateUniformDistributedValues(500, -1, 1).ToList());
    5051
    5152      double x;
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Nguyen/NguyenFunctionTwelve.cs

    r7682 r7698  
    2222using System;
    2323using System.Collections.Generic;
     24using System.Linq;
    2425
    2526namespace HeuristicLab.Problems.Instances.Regression {
     
    4748    protected override List<List<double>> GenerateValues() {
    4849      List<List<double>> data = new List<List<double>>();
    49       data.Add(ValueGenerator.GenerateUniformDistributedValues(1000, 0, 1));
    50       data.Add(ValueGenerator.GenerateUniformDistributedValues(1000, 0, 1));
     50      data.Add(ValueGenerator.GenerateUniformDistributedValues(1000, 0, 1).ToList());
     51      data.Add(ValueGenerator.GenerateUniformDistributedValues(1000, 0, 1).ToList());
    5152
    5253      double x, y;
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Nguyen/NguyenFunctionTwo.cs

    r7682 r7698  
    2222using System;
    2323using System.Collections.Generic;
     24using System.Linq;
    2425
    2526namespace HeuristicLab.Problems.Instances.Regression {
     
    4748    protected override List<List<double>> GenerateValues() {
    4849      List<List<double>> data = new List<List<double>>();
    49       data.Add(ValueGenerator.GenerateUniformDistributedValues(500, -1, 1));
     50      data.Add(ValueGenerator.GenerateUniformDistributedValues(500, -1, 1).ToList());
    5051
    5152      double x;
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/ValueGenerator.cs

    r7682 r7698  
    2929    protected static FastRandom rand = new FastRandom();
    3030
    31     public static List<double> GenerateSteps(double start, double end, double stepWidth) {
     31    public static IEnumerable<double> GenerateSteps(double start, double end, double stepWidth) {
    3232      return Enumerable.Range(0, (int)Math.Round(((end - start) / stepWidth) + 1))
    33                                       .Select(i => (start + i * stepWidth))
    34                                       .ToList<double>();
     33                                      .Select(i => (start + i * stepWidth));
    3534    }
    3635
    37     public static List<double> GenerateUniformDistributedValues(int amount, double start, double end) {
     36    public static IEnumerable<double> GenerateUniformDistributedValues(int amount, double start, double end) {
    3837      List<double> values = new List<double>();
    3938      for (int i = 0; i < amount; i++) {
     
    4342    }
    4443
    45     public static List<double> GenerateNormalDistributedValues(int amount, double mu, double sigma) {
     44    public static IEnumerable<double> GenerateNormalDistributedValues(int amount, double mu, double sigma) {
    4645      List<double> values = new List<double>();
    4746      for (int i = 0; i < amount; i++) {
     
    5150    }
    5251
    53     public static List<List<double>> GenerateAllCombinationsOfValuesInLists(List<List<double>> sets) {
     52    public static IEnumerable<IEnumerable<double>> GenerateAllCombinationsOfValuesInLists(List<List<double>> sets) {
    5453
    5554      var combinations = new List<List<double>>();
     
    6160        combinations = AddListToCombinations(combinations, set);
    6261
    63       combinations = (from i in Enumerable.Range(0, sets.Count)
    64                       select (from list in combinations
    65                               select list.ElementAt(i)).ToList<double>()).ToList<List<double>>();
     62      IEnumerable<IEnumerable<double>> res = (from i in Enumerable.Range(0, sets.Count)
     63                                              select (from list in combinations
     64                                                      select list.ElementAt(i)));
    6665
    67       return combinations;
     66      return res;
    6867    }
    6968
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Various/PolyTen.cs

    r7682 r7698  
    4949      List<List<double>> data = new List<List<double>>();
    5050      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    51         data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -1, 1));
     51        data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -1, 1).ToList());
    5252      }
    5353
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Various/SpatialCoevolution.cs

    r7682 r7698  
    5252      List<List<double>> data = new List<List<double>>();
    5353
    54       List<double> oneVariableTestData = ValueGenerator.GenerateSteps(-5, 5, 0.4);
     54      List<double> oneVariableTestData = ValueGenerator.GenerateSteps(-5, 5, 0.4).ToList();
    5555      List<List<double>> testData = new List<List<double>>() { oneVariableTestData, oneVariableTestData };
    56       testData = ValueGenerator.GenerateAllCombinationsOfValuesInLists(testData);
     56      var combinations = ValueGenerator.GenerateAllCombinationsOfValuesInLists(testData).ToList<IEnumerable<double>>();
    5757
    5858      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    59         data.Add(ValueGenerator.GenerateUniformDistributedValues(1000, -5, 5));
    60         data[i].AddRange(testData[i]);
     59        data.Add(ValueGenerator.GenerateUniformDistributedValues(1000, -5, 5).ToList());
     60        data[i].AddRange(combinations[i]);
    6161      }
    6262
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Vladislavleva/KotanchekFunction.cs

    r7682 r7698  
    4949      List<List<double>> data = new List<List<double>>();
    5050
    51       List<double> oneVariableTestData = ValueGenerator.GenerateSteps(-0.2, 4.2, 0.1);
     51      List<double> oneVariableTestData = ValueGenerator.GenerateSteps(-0.2, 4.2, 0.1).ToList();
    5252      List<List<double>> testData = new List<List<double>>() { oneVariableTestData, oneVariableTestData };
    53       testData = ValueGenerator.GenerateAllCombinationsOfValuesInLists(testData);
     53      var combinations = ValueGenerator.GenerateAllCombinationsOfValuesInLists(testData).ToList<IEnumerable<double>>();
    5454      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    55         data.Add(ValueGenerator.GenerateUniformDistributedValues(1000, 0.3, 4));
    56         data[i].AddRange(testData[i]);
     55        data.Add(ValueGenerator.GenerateUniformDistributedValues(1000, 0.3, 4).ToList());
     56        data[i].AddRange(combinations[i]);
    5757      }
    5858
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Vladislavleva/RationalPolynomialThreeDimensional.cs

    r7682 r7698  
    5050
    5151      int amountOfPoints = 1000;
    52       data.Add(ValueGenerator.GenerateUniformDistributedValues(amountOfPoints, 0.05, 2));
    53       data.Add(ValueGenerator.GenerateUniformDistributedValues(amountOfPoints, 1, 2));
    54       data.Add(ValueGenerator.GenerateUniformDistributedValues(amountOfPoints, 0.05, 2));
     52      data.Add(ValueGenerator.GenerateUniformDistributedValues(amountOfPoints, 0.05, 2).ToList());
     53      data.Add(ValueGenerator.GenerateUniformDistributedValues(amountOfPoints, 1, 2).ToList());
     54      data.Add(ValueGenerator.GenerateUniformDistributedValues(amountOfPoints, 0.05, 2).ToList());
    5555
    5656      List<List<double>> testData = new List<List<double>>() {
    57         ValueGenerator.GenerateSteps(-0.05, 2.1, 0.15),
    58         ValueGenerator.GenerateSteps( 0.95, 2.05, 0.1),
    59         ValueGenerator.GenerateSteps(-0.05, 2.1, 0.15)
     57        ValueGenerator.GenerateSteps(-0.05, 2.1, 0.15).ToList(),
     58        ValueGenerator.GenerateSteps( 0.95, 2.05, 0.1).ToList(),
     59        ValueGenerator.GenerateSteps(-0.05, 2.1, 0.15).ToList()
    6060      };
    6161
    62       testData = ValueGenerator.GenerateAllCombinationsOfValuesInLists(testData);
     62      var combinations = ValueGenerator.GenerateAllCombinationsOfValuesInLists(testData).ToList<IEnumerable<double>>();
    6363
    6464      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    65         data[i].AddRange(testData[i]);
     65        data[i].AddRange(combinations[i]);
    6666      }
    6767
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Vladislavleva/RationalPolynomialTwoDimensional.cs

    r7682 r7698  
    4949      List<List<double>> data = new List<List<double>>();
    5050
    51       List<double> oneVariableTestData = ValueGenerator.GenerateSteps(-0.25, 6.35, 0.2);
     51      List<double> oneVariableTestData = ValueGenerator.GenerateSteps(-0.25, 6.35, 0.2).ToList();
    5252      List<List<double>> testData = new List<List<double>>() { oneVariableTestData, oneVariableTestData };
    5353
    54       testData = ValueGenerator.GenerateAllCombinationsOfValuesInLists(testData);
     54      var combinations = ValueGenerator.GenerateAllCombinationsOfValuesInLists(testData).ToList<IEnumerable<double>>();
    5555      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    56         data.Add(ValueGenerator.GenerateUniformDistributedValues(1000, 0.05, 6.05));
    57         data[i].AddRange(oneVariableTestData);
     56        data.Add(ValueGenerator.GenerateUniformDistributedValues(1000, 0.05, 6.05).ToList());
     57        data[i].AddRange(combinations[i]);
    5858      }
    5959
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Vladislavleva/RippleFunction.cs

    r7682 r7698  
    4949      List<List<double>> data = new List<List<double>>();
    5050      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    51         data.Add(ValueGenerator.GenerateUniformDistributedValues(TrainingPartitionEnd, 0.05, 6.05));
     51        data.Add(ValueGenerator.GenerateUniformDistributedValues(TrainingPartitionEnd, 0.05, 6.05).ToList());
    5252      }
    5353
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Vladislavleva/SalutowiczFunctionOneDimensional.cs

    r7682 r7698  
    2222using System;
    2323using System.Collections.Generic;
     24using System.Linq;
    2425
    2526namespace HeuristicLab.Problems.Instances.Regression {
     
    4748    protected override List<List<double>> GenerateValues() {
    4849      List<List<double>> data = new List<List<double>>();
    49       data.Add(ValueGenerator.GenerateSteps(0.05, 10, 0.1));
     50      data.Add(ValueGenerator.GenerateSteps(0.05, 10, 0.1).ToList());
    5051      data[0].AddRange(ValueGenerator.GenerateSteps(-0.5, 10.5, 0.05));
    5152
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Vladislavleva/SalutowiczFunctionTwoDimensional.cs

    r7682 r7698  
    5050      List<List<double>> data = new List<List<double>>();
    5151      List<List<double>> trainingData = new List<List<double>>() {
    52         ValueGenerator.GenerateSteps(0.05, 10, 0.1),
    53         ValueGenerator.GenerateSteps(0.05, 10.05, 2)
     52        ValueGenerator.GenerateSteps(0.05, 10, 0.1).ToList(),
     53        ValueGenerator.GenerateSteps(0.05, 10.05, 2).ToList()
    5454      };
    5555
    5656      List<List<double>> testData = new List<List<double>>() {
    57         ValueGenerator.GenerateSteps(-0.5, 10.5, 0.1),
    58         ValueGenerator.GenerateSteps(-0.5, 10.5, 0.5)
     57        ValueGenerator.GenerateSteps(-0.5, 10.5, 0.1).ToList(),
     58        ValueGenerator.GenerateSteps(-0.5, 10.5, 0.5).ToList()
    5959      };
    6060
    61       trainingData = ValueGenerator.GenerateAllCombinationsOfValuesInLists(trainingData);
    62       testData = ValueGenerator.GenerateAllCombinationsOfValuesInLists(testData);
     61      var trainingComb = ValueGenerator.GenerateAllCombinationsOfValuesInLists(trainingData).ToList<IEnumerable<double>>();
     62      var testComb = ValueGenerator.GenerateAllCombinationsOfValuesInLists(testData).ToList<IEnumerable<double>>();
    6363
    6464      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    65         data.Add(trainingData[i]);
    66         data[i].AddRange(testData[i]);
     65        data.Add(trainingComb[i].ToList());
     66        data[i].AddRange(testComb[i]);
    6767      }
    6868
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Vladislavleva/SineCosineFunction.cs

    r7682 r7698  
    4848    protected override List<List<double>> GenerateValues() {
    4949      List<List<double>> data = new List<List<double>>();
    50       List<double> oneVariableTestData = ValueGenerator.GenerateSteps(-0.05, 6.05, 0.02);
     50      List<double> oneVariableTestData = ValueGenerator.GenerateSteps(-0.05, 6.05, 0.02).ToList();
    5151      List<List<double>> testData = new List<List<double>>() { oneVariableTestData, oneVariableTestData };
    52       testData = ValueGenerator.GenerateAllCombinationsOfValuesInLists(testData);
     52      var combinations = ValueGenerator.GenerateAllCombinationsOfValuesInLists(testData).ToList<IEnumerable<double>>();
    5353
    5454      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    55         data.Add(ValueGenerator.GenerateUniformDistributedValues(500, 0.1, 5.9));
    56         data[i].AddRange(testData[i]);
     55        data.Add(ValueGenerator.GenerateUniformDistributedValues(500, 0.1, 5.9).ToList());
     56        data[i].AddRange(combinations[i]);
    5757      }
    5858
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Vladislavleva/UnwrappedBallFunctionFiveDimensional.cs

    r7682 r7698  
    4949      List<List<double>> data = new List<List<double>>();
    5050      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    51         data.Add(ValueGenerator.GenerateUniformDistributedValues(1024, 0.05, 6.05));
     51        data.Add(ValueGenerator.GenerateUniformDistributedValues(1024, 0.05, 6.05).ToList());
    5252        data[i].AddRange(ValueGenerator.GenerateUniformDistributedValues(5000, -0.25, 6.35));
    5353      }
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Views/3.4/ProblemInstanceConsumerView.cs

    r7684 r7698  
    5656      } else {
    5757        problemInstanceProviderComboBox.DisplayMember = "Name";
    58         problemInstanceProviderComboBox.DataSource = GetProblemInstanceProviders().ToList();
     58        problemInstanceProviderComboBox.DataSource = GetProblemInstanceProviders().OrderBy(x => x.Name).ToList();
    5959      }
    6060      SetEnabledStateOfControls();
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Views/3.4/ProblemInstanceProviderViewGeneric.cs

    r7684 r7698  
    3939    }
    4040
    41     private IProblemInstanceConsumer<T> GenericConsumer { get { return (IProblemInstanceConsumer<T>)Consumer; } }
     41    private IProblemInstanceConsumer<T> GenericConsumer { get { return Consumer as IProblemInstanceConsumer<T>; } }
    4242    public IProblemInstanceConsumer consumer;
    4343    public override IProblemInstanceConsumer Consumer {
     
    4949    }
    5050
    51     private IProblemInstanceExporter<T> GenericExporter { get { return (IProblemInstanceExporter<T>)Exporter; } }
     51    private IProblemInstanceExporter<T> GenericExporter { get { return Exporter as IProblemInstanceExporter<T>; } }
    5252    private IProblemInstanceExporter exporter;
    5353    public override IProblemInstanceExporter Exporter {
     
    8686      instancesComboBox.Enabled = !ReadOnly && !Locked && Content != null && GenericConsumer != null;
    8787      loadButton.Enabled = !ReadOnly && !Locked && Content != null && GenericConsumer != null;
     88      importButton.Enabled = !ReadOnly && !Locked && Content != null && GenericConsumer != null;
    8889      exportButton.Enabled = !ReadOnly && !Locked && Content != null && GenericExporter != null;
    8990      problemInstanceProviderSplitContainer.Panel2Collapsed = !exportButton.Enabled;
Note: See TracChangeset for help on using the changeset viewer.