Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/04/11 08:27:35 (13 years ago)
Author:
abeham
Message:

#1541

  • updated from trunk
Location:
branches/QAPAlgorithms
Files:
1 deleted
12 edited
8 copied

Legend:

Unmodified
Added
Removed
  • branches/QAPAlgorithms

  • branches/QAPAlgorithms/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj

    r6611 r6627  
    110110  </ItemGroup>
    111111  <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>
    112124    <Compile Include="Solution Views\ClassificationSolutionView.cs">
    113125      <SubType>UserControl</SubType>
     
    158170      <DependentUpon>ClusteringSolutionView.cs</DependentUpon>
    159171    </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>
    160178    <Compile Include="Solution Views\DiscriminantFunctionClassificationSolutionView.cs">
    161179      <SubType>UserControl</SubType>
     
    164182      <DependentUpon>DiscriminantFunctionClassificationSolutionView.cs</DependentUpon>
    165183    </Compile>
    166     <Compile Include="Interfaces\IDataAnalysisSolutionEvaluationView.cs" />
    167184    <Compile Include="Interfaces\IDiscriminantFunctionClassificationSolutionEvaluationView.cs" />
    168185    <Compile Include="Interfaces\IClusteringSolutionEvaluationView.cs" />
     
    182199    <Compile Include="Interfaces\IRegressionSolutionEvaluationView.cs" />
    183200    <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>
    184207    <Compile Include="Solution Views\RegressionSolutionView.cs">
    185208      <SubType>UserControl</SubType>
  • branches/QAPAlgorithms/HeuristicLab.Problems.DataAnalysis.Views/3.4/Interfaces/IClassificationSolutionEvaluationView.cs

    r5829 r6627  
    2222
    2323namespace HeuristicLab.Problems.DataAnalysis.Views {
    24   public interface IClassificationSolutionEvaluationView : IDataAnalysisSolutionEvaluationView {
     24  public interface IClassificationSolutionEvaluationView {
    2525    new IClassificationSolution Content { get; set; }
    2626  }
  • branches/QAPAlgorithms/HeuristicLab.Problems.DataAnalysis.Views/3.4/Interfaces/IClusteringSolutionEvaluationView.cs

    r5829 r6627  
    2222
    2323namespace HeuristicLab.Problems.DataAnalysis.Views {
    24   public interface IClusteringSolutionEvaluationView : IDataAnalysisSolutionEvaluationView {
     24  public interface IClusteringSolutionEvaluationView {
    2525    new IClusteringSolution Content { get; set; }
    2626  }
  • branches/QAPAlgorithms/HeuristicLab.Problems.DataAnalysis.Views/3.4/Interfaces/IDiscriminantFunctionClassificationSolutionEvaluationView.cs

    r5829 r6627  
    2222
    2323namespace HeuristicLab.Problems.DataAnalysis.Views {
    24   public interface IDiscriminantFunctionClassificationSolutionEvaluationView : IDataAnalysisSolutionEvaluationView {
     24  public interface IDiscriminantFunctionClassificationSolutionEvaluationView {
    2525    new IDiscriminantFunctionClassificationSolution Content { get; set; }
    2626  }
  • branches/QAPAlgorithms/HeuristicLab.Problems.DataAnalysis.Views/3.4/Interfaces/IRegressionSolutionEvaluationView.cs

    r5829 r6627  
    2222
    2323namespace HeuristicLab.Problems.DataAnalysis.Views {
    24   public interface IRegressionSolutionEvaluationView : IDataAnalysisSolutionEvaluationView {
     24  public interface IRegressionSolutionEvaluationView {
    2525    new IRegressionSolution Content { get; set; }
    2626  }
  • branches/QAPAlgorithms/HeuristicLab.Problems.DataAnalysis.Views/3.4/MenuItems/CreateEnsembleMenuItem.cs

    r6611 r6627  
    2121
    2222using System;
     23using System.Collections.Generic;
    2324using System.Linq;
    24 using System.Collections.Generic;
    2525using System.Windows.Forms;
     26using HeuristicLab.Core;
    2627using HeuristicLab.MainForm;
    2728using HeuristicLab.Optimization;
    2829using HeuristicLab.Optimizer;
    29 using HeuristicLab.Core;
    3030
    3131namespace HeuristicLab.Problems.DataAnalysis.MenuItems {
     
    7575            var ensemble = new RegressionEnsembleSolution(Enumerable.Empty<IRegressionModel>(), problemData);
    7676            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));
    7880            MainFormManager.MainForm.ShowContent(ensemble);
    7981          } else if (group.All(s => s is IClassificationSolution)) {
     
    8587            var ensemble = new ClassificationEnsembleSolution(Enumerable.Empty<IClassificationModel>(), problemData);
    8688            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));
    8892            MainFormManager.MainForm.ShowContent(ensemble);
    8993          }
  • branches/QAPAlgorithms/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/ClassificationSolutionView.cs

    r6611 r6627  
    3434      var classificationSolutionEvaluationViewTypes = ApplicationManager.Manager.GetTypes(typeof(IClassificationSolutionEvaluationView), true);
    3535      foreach (Type viewType in classificationSolutionEvaluationViewTypes)
    36         AddViewListViewItem(viewType);
     36        AddViewListViewItem(viewType, HeuristicLab.Common.Resources.VSImageLibrary.Graph);
    3737    }
    3838
  • branches/QAPAlgorithms/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/ClusteringSolutionView.cs

    r6611 r6627  
    3434      var clusteringSolutionEvaluationViewTypes = ApplicationManager.Manager.GetTypes(typeof(IClusteringSolutionEvaluationView), true);
    3535      foreach (Type viewType in clusteringSolutionEvaluationViewTypes)
    36         AddViewListViewItem(viewType);
     36        AddViewListViewItem(viewType, HeuristicLab.Common.Resources.VSImageLibrary.Graph);
    3737    }
    3838
  • branches/QAPAlgorithms/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/DataAnalysisSolutionView.cs

    r6611 r6627  
    2222using System;
    2323using System.Collections.Generic;
     24using System.Drawing;
     25using System.Linq;
    2426using System.Windows.Forms;
    25 using HeuristicLab.Common.Resources;
    2627using HeuristicLab.MainForm;
    2728using HeuristicLab.Optimization.Views;
     
    4647
    4748      //cache old viewTypes;
    48       var viewTypes = new List<Type>();
     49      var viewTypes = new List<Tuple<Type, Image>>();
    4950      foreach (ListViewItem item in ItemsListView.Items) {
    5051        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]));
    5253      }
    5354
     
    5556
    5657      //readd viewTypes
    57       foreach (Type viewType in viewTypes)
    58         AddViewListViewItem(viewType);
     58      foreach (var tuple in viewTypes)
     59        AddViewListViewItem(tuple.Item1, tuple.Item2);
    5960
    6061      //recover selection
     
    8586    }
    8687
    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) {
    9189      ListViewItem listViewItem = new ListViewItem();
    9290      listViewItem.Text = ViewAttribute.GetViewName(viewType);
    93       itemsListView.SmallImageList.Images.Add(VSImageLibrary.Graph);
     91      itemsListView.SmallImageList.Images.Add(image);
    9492      listViewItem.ImageIndex = itemsListView.SmallImageList.Images.Count - 1;
    9593      listViewItem.Tag = viewType;
     
    10098
    10199    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();
    106101
    107102      foreach (ListViewItem item in itemsToRemove)
  • branches/QAPAlgorithms/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/DiscriminantFunctionClassificationSolutionView.cs

    r6611 r6627  
    3434      var classificationSolutionEvaluationViewTypes = ApplicationManager.Manager.GetTypes(typeof(IClassificationSolutionEvaluationView), true);
    3535      foreach (Type viewType in classificationSolutionEvaluationViewTypes)
    36         AddViewListViewItem(viewType);
     36        AddViewListViewItem(viewType, HeuristicLab.Common.Resources.VSImageLibrary.Graph);
    3737      RemoveViewListViewItem(typeof(ClassificationSolutionEstimatedClassValuesView));
    3838
    3939      var regressionSolutionEvaluationViewTypes = ApplicationManager.Manager.GetTypes(typeof(IDiscriminantFunctionClassificationSolutionEvaluationView), true);
    4040      foreach (Type viewType in regressionSolutionEvaluationViewTypes)
    41         AddViewListViewItem(viewType);
     41        AddViewListViewItem(viewType, HeuristicLab.Common.Resources.VSImageLibrary.Graph);
    4242    }
    4343
  • branches/QAPAlgorithms/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/RegressionSolutionView.cs

    r6611 r6627  
    3434      var regressionSolutionEvaluationViewTypes = ApplicationManager.Manager.GetTypes(typeof(IRegressionSolutionEvaluationView), true);
    3535      foreach (Type viewType in regressionSolutionEvaluationViewTypes)
    36         AddViewListViewItem(viewType);
     36        AddViewListViewItem(viewType, HeuristicLab.Common.Resources.VSImageLibrary.Graph);
    3737    }
    3838
Note: See TracChangeset for help on using the changeset viewer.