Changeset 10676
- Timestamp:
- 03/27/14 12:49:33 (11 years ago)
- Location:
- branches/DataPreprocessing
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/DataPreprocessorStarter.cs
r10673 r10676 26 26 using HeuristicLab.Optimization; 27 27 using HeuristicLab.Problems.DataAnalysis; 28 using HeuristicLab.Problems.DataAnalysis.Symbolic;29 28 using HeuristicLab.Problems.DataAnalysis.Views; 30 29 using View = HeuristicLab.MainForm.WindowsForms.View; … … 35 34 public void Start(IDataAnalysisProblemData problemData, View currentView) { 36 35 IAlgorithm algorithm; 37 I SymbolicDataAnalysisProblem problem;36 IDataAnalysisProblem problem; 38 37 IItem parentItem = GetMostOuterContent(currentView, out algorithm, out problem); 39 38 var context = new PreprocessingContext(problemData, algorithm, problem); … … 41 40 } 42 41 43 private IItem GetMostOuterContent(Control control, out IAlgorithm algorithm, out I SymbolicDataAnalysisProblem problem) {42 private IItem GetMostOuterContent(Control control, out IAlgorithm algorithm, out IDataAnalysisProblem problem) { 44 43 algorithm = null; 45 44 problem = null; … … 52 51 algorithm = (IAlgorithm)itemView.Content; 53 52 } 54 if (itemView.Content is I SymbolicDataAnalysisProblem) {55 problem = (I SymbolicDataAnalysisProblem)itemView.Content;53 if (itemView.Content is IDataAnalysisProblem) { 54 problem = (IDataAnalysisProblem)itemView.Content; 56 55 } 57 56 } -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/HeuristicLab.DataPreprocessing.Views-3.3.csproj
r10673 r10676 214 214 <Name>HeuristicLab.PluginInfrastructure-3.3</Name> 215 215 </ProjectReference> 216 <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis.Symbolic\3.4\HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj">217 <Project>{3d28463f-ec96-4d82-afee-38be91a0ca00}</Project>218 <Name>HeuristicLab.Problems.DataAnalysis.Symbolic-3.4</Name>219 </ProjectReference>220 216 <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis.Views\3.4\HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj"> 221 217 <Project>{3E9E8944-44FF-40BB-A622-3A4A7DD0F198}</Project> -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/Plugin.cs.frame
r10673 r10676 34 34 [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")] 35 35 [PluginDependency("HeuristicLab.Problems.DataAnalysis.Views","3.4")] 36 [PluginDependency("HeuristicLab.Problems.DataAnalysis.Symbolic", "3.4")]37 36 public class HeuristicLabDataPreprocessingPlugin : PluginBase { 38 37 } -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingContext.cs
r10673 r10676 27 27 using HeuristicLab.Problems.DataAnalysis; 28 28 using HeuristicLab.Problems.DataAnalysis.Symbolic; 29 using Variable = HeuristicLab.Problems.DataAnalysis.Symbolic.Variable; 29 30 30 31 namespace HeuristicLab.DataPreprocessing { … … 39 40 public IAlgorithm Algorithm { get; private set; } 40 41 41 public I SymbolicDataAnalysisProblem Problem { get; private set; }42 public IDataAnalysisProblem Problem { get; private set; } 42 43 43 public PreprocessingContext(IDataAnalysisProblemData dataAnalysisProblemData, IAlgorithm algorithm, I SymbolicDataAnalysisProblem problem) {44 public PreprocessingContext(IDataAnalysisProblemData dataAnalysisProblemData, IAlgorithm algorithm, IDataAnalysisProblem problem) { 44 45 Data = new TransactionalPreprocessingData(dataAnalysisProblemData); 45 46 DataAnalysisProblemData = dataAnalysisProblemData; … … 63 64 if (Algorithm != null) { 64 65 return ExportAlgorithm(); 65 } else {66 return ExportProblem();67 66 } 67 return ExportProblem(); 68 68 } 69 69 70 public IProblem ExportProblem() { 70 71 return Export(Problem, SetupProblem); … … 74 75 } 75 76 76 private I SymbolicDataAnalysisProblem SetupProblem(IProblem problem) {77 return (I SymbolicDataAnalysisProblem)problem;77 private IDataAnalysisProblem SetupProblem(IProblem problem) { 78 return (IDataAnalysisProblem)problem; 78 79 } 79 private I SymbolicDataAnalysisProblem SetupAlgorithm(IAlgorithm algorithm) {80 private IDataAnalysisProblem SetupAlgorithm(IAlgorithm algorithm) { 80 81 algorithm.Name = algorithm.Name + "(Preprocessed)"; 81 82 algorithm.Runs.Clear(); 82 return (I SymbolicDataAnalysisProblem)algorithm.Problem;83 return (IDataAnalysisProblem)algorithm.Problem; 83 84 } 84 private T Export<T>(T original, Func<T, I SymbolicDataAnalysisProblem> setup)85 private T Export<T>(T original, Func<T, IDataAnalysisProblem> setup) 85 86 where T : IItem { 86 87 var creator = new ProblemDataCreator(this); … … 93 94 problem.Name = "Preprocessed " + problem.Name; 94 95 95 var tree = new SymbolicExpressionTree(new ProgramRootSymbol().CreateTreeNode()); 96 var variableNode = (VariableTreeNode)new HeuristicLab.Problems.DataAnalysis.Symbolic.Variable("dummy", "dummy description").CreateTreeNode(); 97 variableNode.VariableName = "dummy"; 98 tree.Root.AddSubtree(variableNode); 96 var symbolicProblem = problem as ISymbolicDataAnalysisProblem; 97 if (symbolicProblem != null) { 98 var tree = new SymbolicExpressionTree(new ProgramRootSymbol().CreateTreeNode()); 99 var variableNode = (VariableTreeNode)new Variable("dummy", "dummy description").CreateTreeNode(); 100 variableNode.VariableName = "dummy"; 101 tree.Root.AddSubtree(variableNode); 99 102 100 problem.TransformationsParameter.Value.Add(tree); 103 symbolicProblem.TransformationsParameter.Value.Add(tree); 104 } 101 105 102 106 return clone; -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IPreprocessingContext.cs
r10673 r10676 24 24 using HeuristicLab.Optimization; 25 25 using HeuristicLab.Problems.DataAnalysis; 26 using HeuristicLab.Problems.DataAnalysis.Symbolic;27 26 28 27 namespace HeuristicLab.DataPreprocessing { … … 37 36 IAlgorithm Algorithm { get; } 38 37 39 I SymbolicDataAnalysisProblem Problem { get; }38 IDataAnalysisProblem Problem { get; } 40 39 41 40 IItem ExportAlgorithmOrProblem();
Note: See TracChangeset
for help on using the changeset viewer.