- Timestamp:
- 08/04/11 08:27:35 (13 years ago)
- Location:
- branches/QAPAlgorithms
- Files:
-
- 1 deleted
- 12 edited
- 8 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/QAPAlgorithms
- Property svn:mergeinfo changed
/trunk/sources merged: 6612-6614
- Property svn:mergeinfo changed
-
branches/QAPAlgorithms/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj
r6611 r6627 110 110 </ItemGroup> 111 111 <ItemGroup> 112 <Compile Include="Classification\ClassificationEnsembleSolutionModelView.cs"> 113 <SubType>UserControl</SubType> 114 </Compile> 115 <Compile Include="Classification\ClassificationEnsembleSolutionModelView.Designer.cs"> 116 <DependentUpon>ClassificationEnsembleSolutionModelView.cs</DependentUpon> 117 </Compile> 118 <Compile Include="Regression\RegressionEnsembleSolutionModelView.cs"> 119 <SubType>UserControl</SubType> 120 </Compile> 121 <Compile Include="Regression\RegressionEnsembleSolutionModelView.Designer.cs"> 122 <DependentUpon>RegressionEnsembleSolutionModelView.cs</DependentUpon> 123 </Compile> 112 124 <Compile Include="Solution Views\ClassificationSolutionView.cs"> 113 125 <SubType>UserControl</SubType> … … 158 170 <DependentUpon>ClusteringSolutionView.cs</DependentUpon> 159 171 </Compile> 172 <Compile Include="Solution Views\ClassificationEnsembleSolutionView.cs"> 173 <SubType>UserControl</SubType> 174 </Compile> 175 <Compile Include="Solution Views\ClassificationEnsembleSolutionView.Designer.cs"> 176 <DependentUpon>ClassificationEnsembleSolutionView.cs</DependentUpon> 177 </Compile> 160 178 <Compile Include="Solution Views\DiscriminantFunctionClassificationSolutionView.cs"> 161 179 <SubType>UserControl</SubType> … … 164 182 <DependentUpon>DiscriminantFunctionClassificationSolutionView.cs</DependentUpon> 165 183 </Compile> 166 <Compile Include="Interfaces\IDataAnalysisSolutionEvaluationView.cs" />167 184 <Compile Include="Interfaces\IDiscriminantFunctionClassificationSolutionEvaluationView.cs" /> 168 185 <Compile Include="Interfaces\IClusteringSolutionEvaluationView.cs" /> … … 182 199 <Compile Include="Interfaces\IRegressionSolutionEvaluationView.cs" /> 183 200 <Compile Include="MenuItems\CreateEnsembleMenuItem.cs" /> 201 <Compile Include="Solution Views\RegressionEnsembleSolutionView.cs"> 202 <SubType>UserControl</SubType> 203 </Compile> 204 <Compile Include="Solution Views\RegressionEnsembleSolutionView.Designer.cs"> 205 <DependentUpon>RegressionEnsembleSolutionView.cs</DependentUpon> 206 </Compile> 184 207 <Compile Include="Solution Views\RegressionSolutionView.cs"> 185 208 <SubType>UserControl</SubType> -
branches/QAPAlgorithms/HeuristicLab.Problems.DataAnalysis.Views/3.4/Interfaces/IClassificationSolutionEvaluationView.cs
r5829 r6627 22 22 23 23 namespace HeuristicLab.Problems.DataAnalysis.Views { 24 public interface IClassificationSolutionEvaluationView : IDataAnalysisSolutionEvaluationView{24 public interface IClassificationSolutionEvaluationView { 25 25 new IClassificationSolution Content { get; set; } 26 26 } -
branches/QAPAlgorithms/HeuristicLab.Problems.DataAnalysis.Views/3.4/Interfaces/IClusteringSolutionEvaluationView.cs
r5829 r6627 22 22 23 23 namespace HeuristicLab.Problems.DataAnalysis.Views { 24 public interface IClusteringSolutionEvaluationView : IDataAnalysisSolutionEvaluationView{24 public interface IClusteringSolutionEvaluationView { 25 25 new IClusteringSolution Content { get; set; } 26 26 } -
branches/QAPAlgorithms/HeuristicLab.Problems.DataAnalysis.Views/3.4/Interfaces/IDiscriminantFunctionClassificationSolutionEvaluationView.cs
r5829 r6627 22 22 23 23 namespace HeuristicLab.Problems.DataAnalysis.Views { 24 public interface IDiscriminantFunctionClassificationSolutionEvaluationView : IDataAnalysisSolutionEvaluationView{24 public interface IDiscriminantFunctionClassificationSolutionEvaluationView { 25 25 new IDiscriminantFunctionClassificationSolution Content { get; set; } 26 26 } -
branches/QAPAlgorithms/HeuristicLab.Problems.DataAnalysis.Views/3.4/Interfaces/IRegressionSolutionEvaluationView.cs
r5829 r6627 22 22 23 23 namespace HeuristicLab.Problems.DataAnalysis.Views { 24 public interface IRegressionSolutionEvaluationView : IDataAnalysisSolutionEvaluationView{24 public interface IRegressionSolutionEvaluationView { 25 25 new IRegressionSolution Content { get; set; } 26 26 } -
branches/QAPAlgorithms/HeuristicLab.Problems.DataAnalysis.Views/3.4/MenuItems/CreateEnsembleMenuItem.cs
r6611 r6627 21 21 22 22 using System; 23 using System.Collections.Generic; 23 24 using System.Linq; 24 using System.Collections.Generic;25 25 using System.Windows.Forms; 26 using HeuristicLab.Core; 26 27 using HeuristicLab.MainForm; 27 28 using HeuristicLab.Optimization; 28 29 using HeuristicLab.Optimizer; 29 using HeuristicLab.Core;30 30 31 31 namespace HeuristicLab.Problems.DataAnalysis.MenuItems { … … 75 75 var ensemble = new RegressionEnsembleSolution(Enumerable.Empty<IRegressionModel>(), problemData); 76 76 ensemble.Name = group.Key + " ensemble"; 77 ensemble.AddModelsAndPartitions(group.OfType<IRegressionSolution>()); 77 var nestedSolutions = group.OfType<RegressionEnsembleSolution>().SelectMany(e => e.RegressionSolutions); 78 var solutions = group.Where(s => !(s is RegressionEnsembleSolution)).OfType<IRegressionSolution>(); 79 ensemble.AddRegressionSolutions(nestedSolutions.Concat(solutions)); 78 80 MainFormManager.MainForm.ShowContent(ensemble); 79 81 } else if (group.All(s => s is IClassificationSolution)) { … … 85 87 var ensemble = new ClassificationEnsembleSolution(Enumerable.Empty<IClassificationModel>(), problemData); 86 88 ensemble.Name = group.Key + " ensemble"; 87 ensemble.AddModelsAndPartitions(group.OfType<IClassificationSolution>()); 89 var nestedSolutions = group.OfType<ClassificationEnsembleSolution>().SelectMany(e => e.ClassificationSolutions); 90 var solutions = group.Where(s => !(s is ClassificationEnsembleSolution)).OfType<IClassificationSolution>(); 91 ensemble.AddClassificationSolutions(nestedSolutions.Concat(solutions)); 88 92 MainFormManager.MainForm.ShowContent(ensemble); 89 93 } -
branches/QAPAlgorithms/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/ClassificationSolutionView.cs
r6611 r6627 34 34 var classificationSolutionEvaluationViewTypes = ApplicationManager.Manager.GetTypes(typeof(IClassificationSolutionEvaluationView), true); 35 35 foreach (Type viewType in classificationSolutionEvaluationViewTypes) 36 AddViewListViewItem(viewType );36 AddViewListViewItem(viewType, HeuristicLab.Common.Resources.VSImageLibrary.Graph); 37 37 } 38 38 -
branches/QAPAlgorithms/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/ClusteringSolutionView.cs
r6611 r6627 34 34 var clusteringSolutionEvaluationViewTypes = ApplicationManager.Manager.GetTypes(typeof(IClusteringSolutionEvaluationView), true); 35 35 foreach (Type viewType in clusteringSolutionEvaluationViewTypes) 36 AddViewListViewItem(viewType );36 AddViewListViewItem(viewType, HeuristicLab.Common.Resources.VSImageLibrary.Graph); 37 37 } 38 38 -
branches/QAPAlgorithms/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/DataAnalysisSolutionView.cs
r6611 r6627 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.Drawing; 25 using System.Linq; 24 26 using System.Windows.Forms; 25 using HeuristicLab.Common.Resources;26 27 using HeuristicLab.MainForm; 27 28 using HeuristicLab.Optimization.Views; … … 46 47 47 48 //cache old viewTypes; 48 var viewTypes = new List<T ype>();49 var viewTypes = new List<Tuple<Type, Image>>(); 49 50 foreach (ListViewItem item in ItemsListView.Items) { 50 51 var viewType = item.Tag as Type; 51 if (viewType != null) viewTypes.Add( viewType);52 if (viewType != null) viewTypes.Add(Tuple.Create(viewType, imageList.Images[item.ImageIndex])); 52 53 } 53 54 … … 55 56 56 57 //readd viewTypes 57 foreach ( Type viewType in viewTypes)58 AddViewListViewItem( viewType);58 foreach (var tuple in viewTypes) 59 AddViewListViewItem(tuple.Item1, tuple.Item2); 59 60 60 61 //recover selection … … 85 86 } 86 87 87 protected void AddViewListViewItem(Type viewType) { 88 if (!typeof(IDataAnalysisSolutionEvaluationView).IsAssignableFrom(viewType)) 89 throw new ArgumentException("Given type " + viewType + " is not a IDataAnalysisSolutionEvaluationView."); 90 88 protected void AddViewListViewItem(Type viewType, Image image) { 91 89 ListViewItem listViewItem = new ListViewItem(); 92 90 listViewItem.Text = ViewAttribute.GetViewName(viewType); 93 itemsListView.SmallImageList.Images.Add( VSImageLibrary.Graph);91 itemsListView.SmallImageList.Images.Add(image); 94 92 listViewItem.ImageIndex = itemsListView.SmallImageList.Images.Count - 1; 95 93 listViewItem.Tag = viewType; … … 100 98 101 99 protected void RemoveViewListViewItem(Type viewType) { 102 List<ListViewItem> itemsToRemove = new List<ListViewItem>(); ; 103 foreach (ListViewItem item in itemsListView.Items) 104 if (item.Tag as Type == typeof(IDataAnalysisSolutionEvaluationView)) 105 itemsToRemove.Add(item); 100 List<ListViewItem> itemsToRemove = itemsListView.Items.Cast<ListViewItem>().Where(item => item.Tag as Type == viewType).ToList(); 106 101 107 102 foreach (ListViewItem item in itemsToRemove) -
branches/QAPAlgorithms/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/DiscriminantFunctionClassificationSolutionView.cs
r6611 r6627 34 34 var classificationSolutionEvaluationViewTypes = ApplicationManager.Manager.GetTypes(typeof(IClassificationSolutionEvaluationView), true); 35 35 foreach (Type viewType in classificationSolutionEvaluationViewTypes) 36 AddViewListViewItem(viewType );36 AddViewListViewItem(viewType, HeuristicLab.Common.Resources.VSImageLibrary.Graph); 37 37 RemoveViewListViewItem(typeof(ClassificationSolutionEstimatedClassValuesView)); 38 38 39 39 var regressionSolutionEvaluationViewTypes = ApplicationManager.Manager.GetTypes(typeof(IDiscriminantFunctionClassificationSolutionEvaluationView), true); 40 40 foreach (Type viewType in regressionSolutionEvaluationViewTypes) 41 AddViewListViewItem(viewType );41 AddViewListViewItem(viewType, HeuristicLab.Common.Resources.VSImageLibrary.Graph); 42 42 } 43 43 -
branches/QAPAlgorithms/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/RegressionSolutionView.cs
r6611 r6627 34 34 var regressionSolutionEvaluationViewTypes = ApplicationManager.Manager.GetTypes(typeof(IRegressionSolutionEvaluationView), true); 35 35 foreach (Type viewType in regressionSolutionEvaluationViewTypes) 36 AddViewListViewItem(viewType );36 AddViewListViewItem(viewType, HeuristicLab.Common.Resources.VSImageLibrary.Graph); 37 37 } 38 38
Note: See TracChangeset
for help on using the changeset viewer.