Changeset 7698
- Timestamp:
- 04/03/12 09:29:07 (13 years ago)
- Location:
- branches/ProblemInstancesRegressionAndClassification
- Files:
-
- 48 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Keijzer/KeijzerFunctionEight.cs
r7682 r7698 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.Linq; 24 25 25 26 namespace HeuristicLab.Problems.Instances.Regression { … … 48 49 protected override List<List<double>> GenerateValues() { 49 50 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()); 51 52 data[0].AddRange(ValueGenerator.GenerateSteps(1, 100, 0.1)); 52 53 -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Keijzer/KeijzerFunctionFifteen.cs
r7682 r7698 51 51 List<List<double>> data = new List<List<double>>(); 52 52 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()); 54 54 } 55 55 -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Keijzer/KeijzerFunctionFour.cs
r7682 r7698 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.Linq; 24 25 25 26 namespace HeuristicLab.Problems.Instances.Regression { … … 47 48 protected override List<List<double>> GenerateValues() { 48 49 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()); 50 51 data[0].AddRange(ValueGenerator.GenerateSteps(-1, 1, 0.001)); 51 52 -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Keijzer/KeijzerFunctionSeven.cs
r7682 r7698 48 48 protected override List<List<double>> GenerateValues() { 49 49 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()); 51 51 data[0].AddRange(ValueGenerator.GenerateSteps(1, 120, 1)); 52 52 -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Keijzer/KeijzerFunctionSix.cs
r7682 r7698 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.Linq; 24 25 25 26 namespace HeuristicLab.Problems.Instances.Regression { … … 47 48 protected override List<List<double>> GenerateValues() { 48 49 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()); 52 53 53 54 double x, y, z; -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Keijzer/KeijzerFunctionSixteen.cs
r7682 r7698 51 51 List<List<double>> data = new List<List<double>>(); 52 52 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()); 54 54 } 55 55 -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Keijzer/KeijzerFunctionThirteen.cs
r7682 r7698 51 51 List<List<double>> data = new List<List<double>>(); 52 52 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()); 54 54 } 55 55 -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Keijzer/KeijzerFunctionTwelve.cs
r7682 r7698 51 51 List<List<double>> data = new List<List<double>>(); 52 52 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()); 54 54 } 55 55 -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Korns/KornsFunctionEight.cs
r7682 r7698 55 55 List<List<double>> data = new List<List<double>>(); 56 56 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()); 58 58 } 59 59 -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Korns/KornsFunctionEleven.cs
r7682 r7698 54 54 List<List<double>> data = new List<List<double>>(); 55 55 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()); 57 57 } 58 58 -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Korns/KornsFunctionFive.cs
r7682 r7698 55 55 List<List<double>> data = new List<List<double>>(); 56 56 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()); 58 58 } 59 59 -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Korns/KornsFunctionFiveteen.cs
r7682 r7698 55 55 List<List<double>> data = new List<List<double>>(); 56 56 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()); 58 58 } 59 59 -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Korns/KornsFunctionFour.cs
r7682 r7698 54 54 List<List<double>> data = new List<List<double>>(); 55 55 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()); 57 57 } 58 58 -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Korns/KornsFunctionFourteen.cs
r7682 r7698 54 54 List<List<double>> data = new List<List<double>>(); 55 55 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()); 57 57 } 58 58 -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Korns/KornsFunctionNine.cs
r7682 r7698 55 55 List<List<double>> data = new List<List<double>>(); 56 56 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()); 58 58 } 59 59 -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Korns/KornsFunctionOne.cs
r7682 r7698 54 54 List<List<double>> data = new List<List<double>>(); 55 55 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()); 57 57 } 58 58 -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Korns/KornsFunctionSeven.cs
r7682 r7698 54 54 List<List<double>> data = new List<List<double>>(); 55 55 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()); 57 57 } 58 58 -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Korns/KornsFunctionSix.cs
r7682 r7698 55 55 List<List<double>> data = new List<List<double>>(); 56 56 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()); 58 58 } 59 59 -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Korns/KornsFunctionTen.cs
r7682 r7698 54 54 List<List<double>> data = new List<List<double>>(); 55 55 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()); 57 57 } 58 58 -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Korns/KornsFunctionThirteen.cs
r7682 r7698 54 54 List<List<double>> data = new List<List<double>>(); 55 55 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()); 57 57 } 58 58 -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Korns/KornsFunctionThree.cs
r7682 r7698 54 54 List<List<double>> data = new List<List<double>>(); 55 55 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()); 57 57 } 58 58 -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Korns/KornsFunctionTwelve.cs
r7682 r7698 54 54 List<List<double>> data = new List<List<double>>(); 55 55 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()); 57 57 } 58 58 -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Korns/KornsFunctionTwo.cs
r7682 r7698 54 54 List<List<double>> data = new List<List<double>>(); 55 55 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()); 57 57 } 58 58 -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Nguyen/NguyenFunctionEight.cs
r7682 r7698 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.Linq; 24 25 25 26 namespace HeuristicLab.Problems.Instances.Regression { … … 47 48 protected override List<List<double>> GenerateValues() { 48 49 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()); 50 51 51 52 double x; -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Nguyen/NguyenFunctionEleven.cs
r7682 r7698 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.Linq; 24 25 25 26 namespace HeuristicLab.Problems.Instances.Regression { … … 47 48 protected override List<List<double>> GenerateValues() { 48 49 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()); 51 52 52 53 double x, y; -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Nguyen/NguyenFunctionFive.cs
r7682 r7698 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.Linq; 24 25 25 26 namespace HeuristicLab.Problems.Instances.Regression { … … 47 48 protected override List<List<double>> GenerateValues() { 48 49 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()); 50 51 51 52 double x; -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Nguyen/NguyenFunctionFour.cs
r7682 r7698 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.Linq; 24 25 25 26 namespace HeuristicLab.Problems.Instances.Regression { … … 47 48 protected override List<List<double>> GenerateValues() { 48 49 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()); 50 51 51 52 double x; -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Nguyen/NguyenFunctionNine.cs
r7682 r7698 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.Linq; 24 25 25 26 namespace HeuristicLab.Problems.Instances.Regression { … … 47 48 protected override List<List<double>> GenerateValues() { 48 49 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()); 51 52 52 53 double x, y; -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Nguyen/NguyenFunctionOne.cs
r7682 r7698 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.Linq; 24 25 25 26 namespace HeuristicLab.Problems.Instances.Regression { … … 47 48 protected override List<List<double>> GenerateValues() { 48 49 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()); 50 51 51 52 double x; -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Nguyen/NguyenFunctionSeven.cs
r7682 r7698 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.Linq; 24 25 25 26 namespace HeuristicLab.Problems.Instances.Regression { … … 47 48 protected override List<List<double>> GenerateValues() { 48 49 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()); 50 51 51 52 double x; -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Nguyen/NguyenFunctionSix.cs
r7682 r7698 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.Linq; 24 25 25 26 namespace HeuristicLab.Problems.Instances.Regression { … … 47 48 protected override List<List<double>> GenerateValues() { 48 49 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()); 50 51 51 52 double x; -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Nguyen/NguyenFunctionTen.cs
r7682 r7698 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.Linq; 24 25 25 26 namespace HeuristicLab.Problems.Instances.Regression { … … 47 48 protected override List<List<double>> GenerateValues() { 48 49 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()); 51 52 52 53 double x, y; -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Nguyen/NguyenFunctionThree.cs
r7682 r7698 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.Linq; 24 25 25 26 namespace HeuristicLab.Problems.Instances.Regression { … … 47 48 protected override List<List<double>> GenerateValues() { 48 49 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()); 50 51 51 52 double x; -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Nguyen/NguyenFunctionTwelve.cs
r7682 r7698 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.Linq; 24 25 25 26 namespace HeuristicLab.Problems.Instances.Regression { … … 47 48 protected override List<List<double>> GenerateValues() { 48 49 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()); 51 52 52 53 double x, y; -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Nguyen/NguyenFunctionTwo.cs
r7682 r7698 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.Linq; 24 25 25 26 namespace HeuristicLab.Problems.Instances.Regression { … … 47 48 protected override List<List<double>> GenerateValues() { 48 49 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()); 50 51 51 52 double x; -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/ValueGenerator.cs
r7682 r7698 29 29 protected static FastRandom rand = new FastRandom(); 30 30 31 public static List<double> GenerateSteps(double start, double end, double stepWidth) {31 public static IEnumerable<double> GenerateSteps(double start, double end, double stepWidth) { 32 32 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)); 35 34 } 36 35 37 public static List<double> GenerateUniformDistributedValues(int amount, double start, double end) {36 public static IEnumerable<double> GenerateUniformDistributedValues(int amount, double start, double end) { 38 37 List<double> values = new List<double>(); 39 38 for (int i = 0; i < amount; i++) { … … 43 42 } 44 43 45 public static List<double> GenerateNormalDistributedValues(int amount, double mu, double sigma) {44 public static IEnumerable<double> GenerateNormalDistributedValues(int amount, double mu, double sigma) { 46 45 List<double> values = new List<double>(); 47 46 for (int i = 0; i < amount; i++) { … … 51 50 } 52 51 53 public static List<List<double>> GenerateAllCombinationsOfValuesInLists(List<List<double>> sets) {52 public static IEnumerable<IEnumerable<double>> GenerateAllCombinationsOfValuesInLists(List<List<double>> sets) { 54 53 55 54 var combinations = new List<List<double>>(); … … 61 60 combinations = AddListToCombinations(combinations, set); 62 61 63 combinations = (from i in Enumerable.Range(0, sets.Count)64 select (from list in combinations65 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))); 66 65 67 return combinations;66 return res; 68 67 } 69 68 -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Various/PolyTen.cs
r7682 r7698 49 49 List<List<double>> data = new List<List<double>>(); 50 50 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()); 52 52 } 53 53 -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Various/SpatialCoevolution.cs
r7682 r7698 52 52 List<List<double>> data = new List<List<double>>(); 53 53 54 List<double> oneVariableTestData = ValueGenerator.GenerateSteps(-5, 5, 0.4) ;54 List<double> oneVariableTestData = ValueGenerator.GenerateSteps(-5, 5, 0.4).ToList(); 55 55 List<List<double>> testData = new List<List<double>>() { oneVariableTestData, oneVariableTestData }; 56 testData = ValueGenerator.GenerateAllCombinationsOfValuesInLists(testData);56 var combinations = ValueGenerator.GenerateAllCombinationsOfValuesInLists(testData).ToList<IEnumerable<double>>(); 57 57 58 58 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]); 61 61 } 62 62 -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Vladislavleva/KotanchekFunction.cs
r7682 r7698 49 49 List<List<double>> data = new List<List<double>>(); 50 50 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(); 52 52 List<List<double>> testData = new List<List<double>>() { oneVariableTestData, oneVariableTestData }; 53 testData = ValueGenerator.GenerateAllCombinationsOfValuesInLists(testData);53 var combinations = ValueGenerator.GenerateAllCombinationsOfValuesInLists(testData).ToList<IEnumerable<double>>(); 54 54 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]); 57 57 } 58 58 -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Vladislavleva/RationalPolynomialThreeDimensional.cs
r7682 r7698 50 50 51 51 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()); 55 55 56 56 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() 60 60 }; 61 61 62 testData = ValueGenerator.GenerateAllCombinationsOfValuesInLists(testData);62 var combinations = ValueGenerator.GenerateAllCombinationsOfValuesInLists(testData).ToList<IEnumerable<double>>(); 63 63 64 64 for (int i = 0; i < AllowedInputVariables.Count(); i++) { 65 data[i].AddRange( testData[i]);65 data[i].AddRange(combinations[i]); 66 66 } 67 67 -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Vladislavleva/RationalPolynomialTwoDimensional.cs
r7682 r7698 49 49 List<List<double>> data = new List<List<double>>(); 50 50 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(); 52 52 List<List<double>> testData = new List<List<double>>() { oneVariableTestData, oneVariableTestData }; 53 53 54 testData = ValueGenerator.GenerateAllCombinationsOfValuesInLists(testData);54 var combinations = ValueGenerator.GenerateAllCombinationsOfValuesInLists(testData).ToList<IEnumerable<double>>(); 55 55 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]); 58 58 } 59 59 -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Vladislavleva/RippleFunction.cs
r7682 r7698 49 49 List<List<double>> data = new List<List<double>>(); 50 50 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()); 52 52 } 53 53 -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Vladislavleva/SalutowiczFunctionOneDimensional.cs
r7682 r7698 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.Linq; 24 25 25 26 namespace HeuristicLab.Problems.Instances.Regression { … … 47 48 protected override List<List<double>> GenerateValues() { 48 49 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()); 50 51 data[0].AddRange(ValueGenerator.GenerateSteps(-0.5, 10.5, 0.05)); 51 52 -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Vladislavleva/SalutowiczFunctionTwoDimensional.cs
r7682 r7698 50 50 List<List<double>> data = new List<List<double>>(); 51 51 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() 54 54 }; 55 55 56 56 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() 59 59 }; 60 60 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>>(); 63 63 64 64 for (int i = 0; i < AllowedInputVariables.Count(); i++) { 65 data.Add(training Data[i]);66 data[i].AddRange(test Data[i]);65 data.Add(trainingComb[i].ToList()); 66 data[i].AddRange(testComb[i]); 67 67 } 68 68 -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Vladislavleva/SineCosineFunction.cs
r7682 r7698 48 48 protected override List<List<double>> GenerateValues() { 49 49 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(); 51 51 List<List<double>> testData = new List<List<double>>() { oneVariableTestData, oneVariableTestData }; 52 testData = ValueGenerator.GenerateAllCombinationsOfValuesInLists(testData);52 var combinations = ValueGenerator.GenerateAllCombinationsOfValuesInLists(testData).ToList<IEnumerable<double>>(); 53 53 54 54 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]); 57 57 } 58 58 -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Vladislavleva/UnwrappedBallFunctionFiveDimensional.cs
r7682 r7698 49 49 List<List<double>> data = new List<List<double>>(); 50 50 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()); 52 52 data[i].AddRange(ValueGenerator.GenerateUniformDistributedValues(5000, -0.25, 6.35)); 53 53 } -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Views/3.4/ProblemInstanceConsumerView.cs
r7684 r7698 56 56 } else { 57 57 problemInstanceProviderComboBox.DisplayMember = "Name"; 58 problemInstanceProviderComboBox.DataSource = GetProblemInstanceProviders(). ToList();58 problemInstanceProviderComboBox.DataSource = GetProblemInstanceProviders().OrderBy(x => x.Name).ToList(); 59 59 } 60 60 SetEnabledStateOfControls(); -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Views/3.4/ProblemInstanceProviderViewGeneric.cs
r7684 r7698 39 39 } 40 40 41 private IProblemInstanceConsumer<T> GenericConsumer { get { return (IProblemInstanceConsumer<T>)Consumer; } }41 private IProblemInstanceConsumer<T> GenericConsumer { get { return Consumer as IProblemInstanceConsumer<T>; } } 42 42 public IProblemInstanceConsumer consumer; 43 43 public override IProblemInstanceConsumer Consumer { … … 49 49 } 50 50 51 private IProblemInstanceExporter<T> GenericExporter { get { return (IProblemInstanceExporter<T>)Exporter; } }51 private IProblemInstanceExporter<T> GenericExporter { get { return Exporter as IProblemInstanceExporter<T>; } } 52 52 private IProblemInstanceExporter exporter; 53 53 public override IProblemInstanceExporter Exporter { … … 86 86 instancesComboBox.Enabled = !ReadOnly && !Locked && Content != null && GenericConsumer != null; 87 87 loadButton.Enabled = !ReadOnly && !Locked && Content != null && GenericConsumer != null; 88 importButton.Enabled = !ReadOnly && !Locked && Content != null && GenericConsumer != null; 88 89 exportButton.Enabled = !ReadOnly && !Locked && Content != null && GenericExporter != null; 89 90 problemInstanceProviderSplitContainer.Panel2Collapsed = !exportButton.Enabled;
Note: See TracChangeset
for help on using the changeset viewer.