Changeset 4547 for branches/HeuristicLab.DiversityAnalysis/HeuristicLab.Problems.TravelingSalesman/3.3/Analyzers
- Timestamp:
- 10/01/10 22:09:11 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.