Changeset 10240 for branches/DataPreprocessing
- Timestamp:
- 12/18/13 14:08:20 (11 years ago)
- Location:
- branches/DataPreprocessing
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/DataPreprocessingView.cs
r10221 r10240 28 28 using HeuristicLab.MainForm; 29 29 using HeuristicLab.MainForm.WindowsForms; 30 using HeuristicLab.Optimization; 30 31 using HeuristicLab.Problems.DataAnalysis; 31 32 … … 71 72 cloner.RegisterClonedObject(Content.DataAnalysisProblemData.TestPartition, Data.TestPartition); 72 73 cloner.RegisterClonedObject(Content.DataAnalysisProblemData.InputVariables, variables); 74 if (Content.Algorithm != null) { 75 cloner.RegisterClonedObject(Content.Algorithm.Runs, new RunCollection { OptimizerName = Content.Algorithm.Name }); 76 } 73 77 74 78 var item = cloner.Clone(Content.ParentItem); 75 76 79 MainFormManager.MainForm.ShowContent(item); 77 78 //var clone = null;79 80 80 } 81 81 } -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/HeuristicLab.DataPreprocessing-3.3.csproj
r10239 r10240 150 150 <Name>HeuristicLab.MainForm-3.3</Name> 151 151 </ProjectReference> 152 <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj"> 153 <Project>{14ab8d24-25bc-400c-a846-4627aa945192}</Project> 154 <Name>HeuristicLab.Optimization-3.3</Name> 155 </ProjectReference> 152 156 <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj"> 153 157 <Project>{102bc7d3-0ef9-439c-8f6d-96ff0fdb8e1b}</Project> -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingContext.cs
r10221 r10240 22 22 using HeuristicLab.Common; 23 23 using HeuristicLab.Core; 24 using HeuristicLab.Optimization; 24 25 using HeuristicLab.Problems.DataAnalysis; 25 26 … … 27 28 [Item("PreprocessingContext", "PreprocessingContext")] 28 29 public class PreprocessingContext : Item, IPreprocessingContext { 29 public PreprocessingContext(IPreprocessingData data, IItem parentItem, IDataAnalysisProblemData dataAnalysisProblemData ) {30 public PreprocessingContext(IPreprocessingData data, IItem parentItem, IDataAnalysisProblemData dataAnalysisProblemData, IAlgorithm algorithm) { 30 31 Data = data; 31 32 ParentItem = parentItem; 32 33 DataAnalysisProblemData = dataAnalysisProblemData; 34 Algorithm = algorithm; 33 35 } 34 36 … … 38 40 ParentItem = original.ParentItem; 39 41 DataAnalysisProblemData = original.DataAnalysisProblemData; 42 Algorithm = original.Algorithm; 40 43 } 41 44 … … 49 52 public IDataAnalysisProblemData DataAnalysisProblemData { get; private set; } 50 53 54 public IAlgorithm Algorithm { get; private set; } 55 51 56 public override IDeepCloneable Clone(Cloner cloner) { 52 57 return new PreprocessingContext(this, cloner); -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IPreprocessingContext.cs
r10221 r10240 21 21 22 22 using HeuristicLab.Core; 23 using HeuristicLab.Optimization; 23 24 using HeuristicLab.Problems.DataAnalysis; 24 25 namespace HeuristicLab.DataPreprocessing { … … 32 33 33 34 IDataAnalysisProblemData DataAnalysisProblemData { get; } 35 36 IAlgorithm Algorithm { get; } 34 37 } 35 38 } -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Plugin.cs.frame
r10221 r10240 33 33 [PluginDependency("HeuristicLab.Collections", "3.3")] 34 34 [PluginDependency("HeuristicLab.Persistence", "3.3")] 35 [PluginDependency("HeuristicLab.Optimization", "3.3")] 35 36 [PluginDependency("HeuristicLab.MainForm", "3.3")] 36 37 [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")] -
branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Views/3.4/ProblemDataView.cs
r10236 r10240 30 30 using HeuristicLab.MainForm; 31 31 using HeuristicLab.MainForm.WindowsForms; 32 using HeuristicLab.Optimization; 32 33 33 34 namespace HeuristicLab.Problems.DataAnalysis.Views { … … 103 104 104 105 private void DataPreprocessingButton_Click(object sender, EventArgs e) { 105 IItem parentItem = GetMostOuterContent(); 106 IAlgorithm algorithm; 107 IItem parentItem = GetMostOuterContent(out algorithm); 106 108 var preprocessingData = new PreprocessingData(Content); 107 109 108 110 // TODO: ProblemDataView depends on DataPreprocessing 109 111 //ApplicationManager.Manager.GetInstances<IPreprocessingContext>(); 110 var context = new PreprocessingContext(preprocessingData, parentItem, Content );112 var context = new PreprocessingContext(preprocessingData, parentItem, Content, algorithm); 111 113 MainFormManager.MainForm.ShowContent(context); 112 114 } 113 115 114 private IItem GetMostOuterContent() { 116 private IItem GetMostOuterContent(out IAlgorithm algorithm) { 117 algorithm = null; 115 118 Control control = this; 116 119 ItemView itemView = null; 117 120 do { 118 121 control = control.Parent; 119 if (control is ItemView) 122 if (control is ItemView) { 120 123 itemView = (ItemView)control; 124 if (itemView.Content is IAlgorithm) { 125 algorithm = (IAlgorithm)itemView.Content; 126 } 127 } 121 128 } while (control != null); 122 129
Note: See TracChangeset
for help on using the changeset viewer.