Changeset 7044 for branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression
- Timestamp:
- 11/22/11 16:52:43 (13 years ago)
- Location:
- branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveProblem.cs
r6968 r7044 20 20 #endregion 21 21 22 using System;23 using System.Collections.Generic;24 22 using System.Linq; 25 23 using HeuristicLab.Common; … … 28 26 using HeuristicLab.Parameters; 29 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 30 using HeuristicLab.PluginInfrastructure;31 28 32 29 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression { … … 119 116 ProblemData = problemData; 120 117 } 121 122 public override IEnumerable<IDataAnalysisBenchmarkProblemDataGenerator> GetBenchmarkProblemDataGenerators() {123 return ApplicationManager.Manager.GetInstances<IRegressionBenchmarkProblemDataGenerator>();124 }125 126 public override void CreateProblemDataFromBenchmark(IDataAnalysisBenchmarkProblemDataGenerator benchmarkGenerator) {127 if (!(benchmarkGenerator is IRegressionBenchmarkProblemDataGenerator)) {128 throw new ArgumentException("BenchmarkGenerator is not an IRegressionBenchmarkProblemDataGenerator.");129 }130 131 IDataAnalysisProblemData problemData = benchmarkGenerator.GenerateProblemData();132 133 if (problemData is IRegressionProblemData)134 ProblemData = (IRegressionProblemData)problemData;135 else136 throw new InvalidCastException("ProblemDataGenerator didn't return an IRegressionProblemData.");137 }138 118 } 139 119 } -
branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveProblem.cs
r6968 r7044 20 20 #endregion 21 21 22 using System;23 using System.Collections.Generic;24 22 using System.Linq; 25 23 using HeuristicLab.Common; … … 27 25 using HeuristicLab.Parameters; 28 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 using HeuristicLab.PluginInfrastructure;30 27 31 28 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression { … … 116 113 ProblemData = problemData; 117 114 } 118 119 public override IEnumerable<IDataAnalysisBenchmarkProblemDataGenerator> GetBenchmarkProblemDataGenerators() {120 return ApplicationManager.Manager.GetInstances<IRegressionBenchmarkProblemDataGenerator>();121 }122 123 public override void CreateProblemDataFromBenchmark(IDataAnalysisBenchmarkProblemDataGenerator benchmarkGenerator) {124 if (!(benchmarkGenerator is IRegressionBenchmarkProblemDataGenerator)) {125 throw new ArgumentException("BenchmarkGenerator is not an IRegressionBenchmarkProblemDataGenerator.");126 }127 128 IDataAnalysisProblemData problemData = benchmarkGenerator.GenerateProblemData();129 130 if (problemData is IRegressionProblemData)131 ProblemData = (IRegressionProblemData)problemData;132 else133 throw new InvalidCastException("ProblemDataGenerator didn't return an IRegressionProblemData.");134 }135 115 } 136 116 }
Note: See TracChangeset
for help on using the changeset viewer.