Changeset 4544 for branches/HeuristicLab.DiversityAnalysis
- Timestamp:
- 10/01/10 18:24:56 (14 years ago)
- Location:
- branches/HeuristicLab.DiversityAnalysis/HeuristicLab.Problems.TravelingSalesman/3.3/Analyzers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.DiversityAnalysis/HeuristicLab.Problems.TravelingSalesman/3.3/Analyzers/TSPPopulationDiversityAnalysisDetails.cs
r4506 r4544 35 35 36 36 [Storable] 37 private I List<double> averageSimilarities;38 public I List<double> AverageSimilarities {37 private ItemList<DoubleValue> averageSimilarities; 38 public ItemList<DoubleValue> AverageSimilarities { 39 39 get { return averageSimilarities; } 40 40 } 41 41 [Storable] 42 private I List<double> averageMaximumSimilarities;43 public I List<double> AverageMaximumSimilarities {42 private ItemList<DoubleValue> averageMaximumSimilarities; 43 public ItemList<DoubleValue> AverageMaximumSimilarities { 44 44 get { return averageMaximumSimilarities; } 45 45 } 46 46 47 47 [Storable] 48 private I List<double[,]> similarities;49 public I List<double[,]> Similarities {48 private ItemList<DoubleMatrix> similarities; 49 public ItemList<DoubleMatrix> Similarities { 50 50 get { return similarities; } 51 51 } 52 52 [Storable] 53 private I List<double[]> maximumSimilarities;54 public I List<double[]> MaximumSimilarities {53 private ItemList<DoubleArray> maximumSimilarities; 54 public ItemList<DoubleArray> MaximumSimilarities { 55 55 get { return maximumSimilarities; } 56 56 } … … 58 58 public TSPPopulationDiversityAnalysisDetails() 59 59 : base() { 60 averageSimilarities = new List<double>();61 averageMaximumSimilarities = new List<double>();62 similarities = new List<double[,]>();63 maximumSimilarities = new List<double[]>();60 averageSimilarities = new ItemList<DoubleValue>(); 61 averageMaximumSimilarities = new ItemList<DoubleValue>(); 62 similarities = new ItemList<DoubleMatrix>(); 63 maximumSimilarities = new ItemList<DoubleArray>(); 64 64 } 65 65 -
branches/HeuristicLab.DiversityAnalysis/HeuristicLab.Problems.TravelingSalesman/3.3/Analyzers/TSPPopulationDiversityAnalyzer.cs
r4502 r4544 110 110 edges[i] = CalculateEdgesVector(permutationsArray[i]); 111 111 112 double[,] similarities = new double[cities, cities];113 double[] maxSimilarities = new double[cities];112 DoubleMatrix similarities = new DoubleMatrix(cities, cities); 113 DoubleArray maxSimilarities = new DoubleArray(cities); 114 114 double avgSimilarity = 0; 115 115 int n = 0; … … 165 165 details = (TSPPopulationDiversityAnalysisDetails)(results[PopulationDiversityAnalysisResultsDetailsKey].Value); 166 166 } 167 details.AverageSimilarities.Add(averageSimilarity .Value);168 details.AverageMaximumSimilarities.Add(averageMaximumSimilarity .Value);167 details.AverageSimilarities.Add(averageSimilarity); 168 details.AverageMaximumSimilarities.Add(averageMaximumSimilarity); 169 169 details.Similarities.Add(similarities); 170 170 details.MaximumSimilarities.Add(maxSimilarities);
Note: See TracChangeset
for help on using the changeset viewer.