Changeset 6968 for branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression
- Timestamp:
- 11/08/11 13:18:49 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblem.cs
r5809 r6968 20 20 #endregion 21 21 22 using System; 23 using System.Collections.Generic; 22 24 using HeuristicLab.Common; 23 25 using HeuristicLab.Core; 24 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 27 using HeuristicLab.PluginInfrastructure; 25 28 26 29 namespace HeuristicLab.Problems.DataAnalysis { … … 43 46 ProblemData = problemData; 44 47 } 48 49 public override IEnumerable<IDataAnalysisBenchmarkProblemDataGenerator> GetBenchmarkProblemDataGenerators() { 50 return ApplicationManager.Manager.GetInstances<IRegressionBenchmarkProblemDataGenerator>(); 51 } 52 53 public override void CreateProblemDataFromBenchmark(IDataAnalysisBenchmarkProblemDataGenerator benchmarkGenerator) { 54 if (!(benchmarkGenerator is IRegressionBenchmarkProblemDataGenerator)) { 55 throw new ArgumentException("BenchmarkGenerator is not an IRegressionBenchmarkProblemDataGenerator."); 56 } 57 58 IDataAnalysisProblemData problemData = benchmarkGenerator.GenerateProblemData(); 59 60 if (problemData is IRegressionProblemData) 61 ProblemData = (IRegressionProblemData)problemData; 62 else 63 throw new InvalidCastException("ProblemDataGenerator didn't return an IRegressionProblemData."); 64 } 45 65 } 46 66 }
Note: See TracChangeset
for help on using the changeset viewer.