Free cookie consent management tool by TermsFeed Policy Generator

Changeset 10027


Ignore:
Timestamp:
10/04/13 22:00:01 (11 years ago)
Author:
ascheibe
Message:

#1886 adapted convex hull view to work with real vectors and permutations

Location:
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views/3.3
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views/3.3/ConvexHullView.Designer.cs

    r10007 r10027  
    11namespace HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views {
    2   partial class ConvexHullView {
     2  partial class ConvexHullView<TKey, TValue> {
    33    /// <summary>
    44    /// Required designer variable.
     
    4040      // resultsTextBox
    4141      //
    42       this.resultsTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
    43             | System.Windows.Forms.AnchorStyles.Left) 
     42      this.resultsTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     43            | System.Windows.Forms.AnchorStyles.Left)
    4444            | System.Windows.Forms.AnchorStyles.Right)));
    4545      this.resultsTextBox.Location = new System.Drawing.Point(3, 33);
  • branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views/3.3/ConvexHullView.cs

    r10026 r10027  
    2222using System;
    2323using System.Linq;
    24 using HeuristicLab.Analysis.SolutionCaching.PermutationEncoding;
     24using HeuristicLab.Analysis.SolutionCaching;
     25using HeuristicLab.Core;
    2526using HeuristicLab.Core.Views;
    26 using HeuristicLab.Encodings.PermutationEncoding;
    2727using HeuristicLab.MainForm;
    2828
    2929namespace HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views {
    3030  [View("ConvexHull View")]
    31   [Content(typeof(PermutationSolutionCache), false)]
    32   public partial class ConvexHullView : ItemView {
     31  [Content(typeof(SolutionCache<,>), false)]
     32  public abstract partial class ConvexHullView<TKey, TValue> : ItemView
     33    where TKey : Item
     34    where TValue : SolutionInformation<TKey> {
    3335    public ConvexHullView() {
    3436      InitializeComponent();
    3537    }
    3638
    37     public new PermutationSolutionCache Content {
    38       get { return (PermutationSolutionCache)base.Content; }
     39    public new SolutionCache<TKey, TValue> Content {
     40      get { return (SolutionCache<TKey, TValue>)base.Content; }
    3941      set { base.Content = value; }
    4042    }
    4143
    42     protected override void OnContentChanged() {
    43       base.OnContentChanged();
    44 
    45       if (Content != null) { }
    46     }
    47 
    48     private void testConvexHullButton_Click(object sender, System.EventArgs e) {
     44    protected void testConvexHullButton_Click(object sender, System.EventArgs e) {
    4945      for (int i = 0; i < 20; i++) {
    5046        var sols = Content.GetSolutionsFromGeneration(i);
     
    5854    }
    5955
    60     private double[] ConvertPermutationToVertex(Permutation p) {
    61       double[] vertex = p.Select(x => (double)x).ToArray();
    62       return vertex;
    63     }
     56    protected abstract double[] ConvertPermutationToVertex(TKey key);
    6457  }
    6558}
  • branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views/3.3/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views-3.3.csproj

    r10026 r10027  
    7474      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Encodings.PermutationEncoding-3.3.dll</HintPath>
    7575    </Reference>
     76    <Reference Include="HeuristicLab.Encodings.RealVectorEncoding-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     77      <SpecificVersion>False</SpecificVersion>
     78      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Encodings.RealVectorEncoding-3.3.dll</HintPath>
     79      <Private>False</Private>
     80    </Reference>
    7681    <Reference Include="HeuristicLab.MainForm-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    7782      <Private>False</Private>
     
    131136      <DependentUpon>ConvexHullView.cs</DependentUpon>
    132137    </Compile>
     138    <Compile Include="RealVectorConvexHullView.cs">
     139      <SubType>UserControl</SubType>
     140    </Compile>
    133141    <Compile Include="CreateExperimentDialog.cs">
    134142      <SubType>Form</SubType>
     
    144152    <Compile Include="ParameterInfluenceView.designer.cs">
    145153      <DependentUpon>ParameterInfluenceView.cs</DependentUpon>
     154    </Compile>
     155    <Compile Include="PermutationConvexHullView.cs">
     156      <SubType>UserControl</SubType>
    146157    </Compile>
    147158    <Compile Include="Plugin.cs" />
Note: See TracChangeset for help on using the changeset viewer.