Changeset 4547 for branches/HeuristicLab.DiversityAnalysis
- Timestamp:
- 10/01/10 22:09:11 (14 years ago)
- Location:
- branches/HeuristicLab.DiversityAnalysis
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.DiversityAnalysis/HeuristicLab.Problems.TravelingSalesman.Views/3.3/HeuristicLab.Problems.TravelingSalesman.Views-3.3.csproj
r4505 r4547 221 221 <DependentUpon>TravelingSalesmanProblemView.cs</DependentUpon> 222 222 </EmbeddedResource> 223 <EmbeddedResource Include="TSPPopulationDiversityAnalysisDetailsView.resx"> 224 <DependentUpon>TSPPopulationDiversityAnalysisDetailsView.cs</DependentUpon> 225 </EmbeddedResource> 223 226 </ItemGroup> 224 227 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> -
branches/HeuristicLab.DiversityAnalysis/HeuristicLab.Problems.TravelingSalesman.Views/3.3/TSPPopulationDiversityAnalysisDetailsView.Designer.cs
r4505 r4547 24 24 /// </summary> 25 25 private void InitializeComponent() { 26 components = new System.ComponentModel.Container(); 26 this.parameterCollectionView = new HeuristicLab.Core.Views.ParameterCollectionView(); 27 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 28 this.SuspendLayout(); 29 // 30 // nameTextBox 31 // 32 this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft); 33 this.errorProvider.SetIconPadding(this.nameTextBox, 2); 34 this.nameTextBox.Size = new System.Drawing.Size(610, 20); 35 // 36 // descriptionTextBox 37 // 38 this.descriptionTextBox.Size = new System.Drawing.Size(610, 20); 39 // 40 // parameterCollectionView 41 // 42 this.parameterCollectionView.Caption = "ParameterCollection View"; 43 this.parameterCollectionView.Content = null; 44 this.parameterCollectionView.Dock = System.Windows.Forms.DockStyle.Fill; 45 this.parameterCollectionView.Location = new System.Drawing.Point(0, 0); 46 this.parameterCollectionView.Name = "parameterCollectionView"; 47 this.parameterCollectionView.ReadOnly = true; 48 this.parameterCollectionView.Size = new System.Drawing.Size(682, 350); 49 this.parameterCollectionView.TabIndex = 5; 50 // 51 // TSPPopulationDiversityAnalysisDetailsView 52 // 53 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 27 54 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 55 this.Controls.Add(this.parameterCollectionView); 56 this.Name = "TSPPopulationDiversityAnalysisDetailsView"; 57 this.Size = new System.Drawing.Size(682, 350); 58 this.Controls.SetChildIndex(this.nameLabel, 0); 59 this.Controls.SetChildIndex(this.descriptionLabel, 0); 60 this.Controls.SetChildIndex(this.nameTextBox, 0); 61 this.Controls.SetChildIndex(this.descriptionTextBox, 0); 62 this.Controls.SetChildIndex(this.parameterCollectionView, 0); 63 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); 64 this.ResumeLayout(false); 65 this.PerformLayout(); 66 28 67 } 29 68 30 69 #endregion 70 71 private Core.Views.ParameterCollectionView parameterCollectionView; 31 72 } 32 73 } -
branches/HeuristicLab.DiversityAnalysis/HeuristicLab.Problems.TravelingSalesman.Views/3.3/TSPPopulationDiversityAnalysisDetailsView.cs
r4505 r4547 42 42 } 43 43 44 protected override void DeregisterContentEvents() { 45 base.DeregisterContentEvents(); 46 } 47 protected override void RegisterContentEvents() { 48 base.RegisterContentEvents(); 49 } 50 51 protected override void OnContentChanged() { 52 base.OnContentChanged(); 53 if (Content == null) { 54 parameterCollectionView.Content = null; 55 } else { 56 parameterCollectionView.Content = ((IParameterizedNamedItem)Content).Parameters; 57 } 58 } 59 44 60 } 45 61 -
branches/HeuristicLab.DiversityAnalysis/HeuristicLab.Problems.TravelingSalesman/3.3/Analyzers/TSPPopulationDiversityAnalysisDetails.cs
r4544 r4547 24 24 using HeuristicLab.Data; 25 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 using HeuristicLab.Parameters; 26 27 27 28 namespace HeuristicLab.Problems.TravelingSalesman { … … 32 33 [Item("TSPPopulationDiversityAnalysisDetails", "A class for storing details of population diversity analysis results.")] 33 34 [StorableClass] 34 public class TSPPopulationDiversityAnalysisDetails : NamedItem {35 public class TSPPopulationDiversityAnalysisDetails : ParameterizedNamedItem { 35 36 36 [Storable] 37 private ItemList<DoubleValue> averageSimilarities; 37 public static string AverageSimilaritiesKey = "AverageSimilarities"; 38 public ValueParameter<ItemList<DoubleValue>> AverageSimilaritiesParameter { 39 get { return (ValueParameter<ItemList<DoubleValue>>)Parameters[AverageSimilaritiesKey]; } 40 } 38 41 public ItemList<DoubleValue> AverageSimilarities { 39 get { return averageSimilarities; } 40 } 41 [Storable] 42 private ItemList<DoubleValue> averageMaximumSimilarities; 43 public ItemList<DoubleValue> AverageMaximumSimilarities { 44 get { return averageMaximumSimilarities; } 42 get { return AverageSimilaritiesParameter.Value; } 45 43 } 46 44 47 [Storable] 48 private ItemList<DoubleMatrix> similarities; 45 public static string AverageMaximumSimilaritiesKey = "AverageMaximumSimilarities"; 46 public ValueParameter<ItemList<DoubleValue>> AverageMaximumSimilaritiesParameter { 47 get { return (ValueParameter<ItemList<DoubleValue>>)Parameters[AverageMaximumSimilaritiesKey]; } 48 } 49 public ItemList<DoubleValue> AverageMaximumSimilarities { 50 get { return AverageMaximumSimilaritiesParameter.Value; } 51 } 52 53 public static string SimilaritiesKey = "Similarities"; 54 public ValueParameter<ItemList<DoubleMatrix>> SimilaritiesParameter { 55 get { return (ValueParameter<ItemList<DoubleMatrix>>)Parameters[SimilaritiesKey]; } 56 } 49 57 public ItemList<DoubleMatrix> Similarities { 50 get { return similarities; }58 get { return SimilaritiesParameter.Value; } 51 59 } 52 [Storable] 53 private ItemList<DoubleArray> maximumSimilarities; 60 61 public static string MaximumSimilaritiesKey = "MaximumSimilarities"; 62 public ValueParameter<ItemList<DoubleArray>> MaximumSimilaritiesParameter { 63 get { return (ValueParameter<ItemList<DoubleArray>>)Parameters[MaximumSimilaritiesKey]; } 64 } 54 65 public ItemList<DoubleArray> MaximumSimilarities { 55 get { return maximumSimilarities; }66 get { return MaximumSimilaritiesParameter.Value; } 56 67 } 57 68 58 69 public TSPPopulationDiversityAnalysisDetails() 59 70 : base() { 60 averageSimilarities = new ItemList<DoubleValue>();61 averageMaximumSimilarities = new ItemList<DoubleValue>();62 similarities = new ItemList<DoubleMatrix>();63 maximumSimilarities = new ItemList<DoubleArray>();71 Parameters.Add(new ValueParameter<ItemList<DoubleValue>>(AverageSimilaritiesKey, "Average similarities of the solutions of the population.", new ItemList<DoubleValue>())); 72 Parameters.Add(new ValueParameter<ItemList<DoubleValue>>(AverageMaximumSimilaritiesKey, "Average maximum similarities of the solutions of the population.", new ItemList<DoubleValue>())); 73 Parameters.Add(new ValueParameter<ItemList<DoubleMatrix>>(SimilaritiesKey, "Similarities of the solutions of the population.", new ItemList<DoubleMatrix>())); 74 Parameters.Add(new ValueParameter<ItemList<DoubleArray>>(MaximumSimilaritiesKey, "Maximum similarities of the solutions of the population.", new ItemList<DoubleArray>())); 64 75 } 65 76
Note: See TracChangeset
for help on using the changeset viewer.