Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/01/10 18:24:56 (14 years ago)
Author:
swinkler
Message:

Corrected types of the data stored in population diversity analysis. (#1188)

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  
    3535
    3636    [Storable]
    37     private IList<double> averageSimilarities;
    38     public IList<double> AverageSimilarities {
     37    private ItemList<DoubleValue> averageSimilarities;
     38    public ItemList<DoubleValue> AverageSimilarities {
    3939      get { return averageSimilarities; }
    4040    }
    4141    [Storable]
    42     private IList<double> averageMaximumSimilarities;
    43     public IList<double> AverageMaximumSimilarities {
     42    private ItemList<DoubleValue> averageMaximumSimilarities;
     43    public ItemList<DoubleValue> AverageMaximumSimilarities {
    4444      get { return averageMaximumSimilarities; }
    4545    }
    4646
    4747    [Storable]
    48     private IList<double[,]> similarities;
    49     public IList<double[,]> Similarities {
     48    private ItemList<DoubleMatrix> similarities;
     49    public ItemList<DoubleMatrix> Similarities {
    5050      get { return similarities; }
    5151    }
    5252    [Storable]
    53     private IList<double[]> maximumSimilarities;
    54     public IList<double[]> MaximumSimilarities {
     53    private ItemList<DoubleArray> maximumSimilarities;
     54    public ItemList<DoubleArray> MaximumSimilarities {
    5555      get { return maximumSimilarities; }
    5656    }
     
    5858    public TSPPopulationDiversityAnalysisDetails()
    5959        : 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>();
    6464    }
    6565
  • branches/HeuristicLab.DiversityAnalysis/HeuristicLab.Problems.TravelingSalesman/3.3/Analyzers/TSPPopulationDiversityAnalyzer.cs

    r4502 r4544  
    110110        edges[i] = CalculateEdgesVector(permutationsArray[i]);
    111111
    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);
    114114      double avgSimilarity = 0;
    115115      int n = 0;
     
    165165        details = (TSPPopulationDiversityAnalysisDetails)(results[PopulationDiversityAnalysisResultsDetailsKey].Value);
    166166      }
    167       details.AverageSimilarities.Add(averageSimilarity.Value);
    168       details.AverageMaximumSimilarities.Add(averageMaximumSimilarity.Value);
     167      details.AverageSimilarities.Add(averageSimilarity);
     168      details.AverageMaximumSimilarities.Add(averageMaximumSimilarity);
    169169      details.Similarities.Add(similarities);
    170170      details.MaximumSimilarities.Add(maxSimilarities);
Note: See TracChangeset for help on using the changeset viewer.