Changeset 10007
- Timestamp:
- 09/26/13 10:30:44 (11 years ago)
- Location:
- branches/HeuristicLab.Analysis.AlgorithmBehavior
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views/3.3/ConvexHullView.Designer.cs
r9730 r10007 25 25 private void InitializeComponent() { 26 26 this.testConvexHullButton = new System.Windows.Forms.Button(); 27 this.resultsTextBox = new System.Windows.Forms.TextBox(); 27 28 this.SuspendLayout(); 28 29 // … … 31 32 this.testConvexHullButton.Location = new System.Drawing.Point(3, 3); 32 33 this.testConvexHullButton.Name = "testConvexHullButton"; 33 this.testConvexHullButton.Size = new System.Drawing.Size( 97, 23);34 this.testConvexHullButton.Size = new System.Drawing.Size(130, 23); 34 35 this.testConvexHullButton.TabIndex = 0; 35 this.testConvexHullButton.Text = " TestConvex Hull";36 this.testConvexHullButton.Text = "Calculate Convex Hull"; 36 37 this.testConvexHullButton.UseVisualStyleBackColor = true; 37 38 this.testConvexHullButton.Click += new System.EventHandler(this.testConvexHullButton_Click); 39 // 40 // resultsTextBox 41 // 42 this.resultsTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 43 | System.Windows.Forms.AnchorStyles.Left) 44 | System.Windows.Forms.AnchorStyles.Right))); 45 this.resultsTextBox.Location = new System.Drawing.Point(3, 33); 46 this.resultsTextBox.Multiline = true; 47 this.resultsTextBox.Name = "resultsTextBox"; 48 this.resultsTextBox.Size = new System.Drawing.Size(638, 254); 49 this.resultsTextBox.TabIndex = 1; 38 50 // 39 51 // ConvexHullView … … 41 53 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 42 54 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 55 this.Controls.Add(this.resultsTextBox); 43 56 this.Controls.Add(this.testConvexHullButton); 44 57 this.Name = "ConvexHullView"; 45 this.Size = new System.Drawing.Size( 486, 175);58 this.Size = new System.Drawing.Size(641, 290); 46 59 this.ResumeLayout(false); 60 this.PerformLayout(); 47 61 48 62 } … … 51 65 52 66 private System.Windows.Forms.Button testConvexHullButton; 67 private System.Windows.Forms.TextBox resultsTextBox; 53 68 54 69 } -
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views/3.3/ConvexHullView.cs
r9945 r10007 20 20 #endregion 21 21 22 using System; 22 23 using System.Linq; 23 24 using System.Windows.Forms; … … 26 27 using HeuristicLab.MainForm; 27 28 using HeuristicLab.MainForm.WindowsForms; 28 using MIConvexHull;29 29 30 30 namespace HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views { … … 48 48 49 49 private void testConvexHullButton_Click(object sender, System.EventArgs e) { 50 var sols = Content.GetSolutionsFromGeneration(1); 51 var input = sols.Select(x => ConvertPermutationToVertex(x.GetPermutation())); 52 //TODO: HyperHull.Calculate(Content); 53 //HyperHull.CalculateUsingSMO(Content.GetSolutionsFromGeneration(1)); 50 for (int i = 0; i < 20; i++) { 51 var sols = Content.GetSolutionsFromGeneration(i); 54 52 55 56 //var result = ConvexHull.Create(input); 57 58 //TODO 53 var input = sols.Select(x => ConvertPermutationToVertex(x.GetPermutation())).ToArray(); 54 var convexHull = HyperHull.CalculateUsingSMO(input); 55 resultsTextBox.Text += "Nr. of Points in Generation " + i + ": " + convexHull.Count + Environment.NewLine; 56 resultsTextBox.Text += "Volume of Convex Hull in Generation " + i + " is: " + 57 ConvexHullMeasures.CalculateVolume(convexHull) + Environment.NewLine; 58 } 59 59 } 60 60 61 private DefaultVertex ConvertPermutationToVertex(Permutation p) { 62 DefaultVertex vertex = new DefaultVertex(); 63 vertex.Position = p.Select(x => (double)x).ToArray(); 61 private double[] ConvertPermutationToVertex(Permutation p) { 62 double[] vertex = p.Select(x => (double)x).ToArray(); 64 63 return vertex; 65 64 } -
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers-3.3.csproj
r9945 r10007 38 38 </PropertyGroup> 39 39 <ItemGroup> 40 <Reference Include="ALGLIB-3.7.0, Version=3.7.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 41 <SpecificVersion>False</SpecificVersion> 42 <HintPath>..\..\..\..\trunk\sources\bin\ALGLIB-3.7.0.dll</HintPath> 43 <Private>False</Private> 44 </Reference> 40 45 <Reference Include="HeuristicLab.Algorithms.DataAnalysis-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 41 46 <SpecificVersion>False</SpecificVersion> … … 126 131 <Compile Include="CombinedOperators\QAPAfterCrossoverCombinedOperator.cs" /> 127 132 <Compile Include="HyperHull.cs" /> 133 <Compile Include="ConvexHullMeasures.cs" /> 134 <Compile Include="IntegerExtensions.cs" /> 128 135 <Compile Include="SolutionsCaching\AfterCrossoverSolutionCachingAnalyzer.cs" /> 129 136 <Compile Include="SolutionsCaching\SolutionCachingAnalyzer.cs" /> -
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/SolutionsCaching/PermutationInformation.cs
r9789 r10007 77 77 public override bool Equals(object obj) { 78 78 PermutationInformation pi = obj as PermutationInformation; 79 if (pi == null) return false; 79 80 80 81 if (ProducedBy == pi.ProducedBy && Generation == pi.Generation) {
Note: See TracChangeset
for help on using the changeset viewer.