Free cookie consent management tool by TermsFeed Policy Generator

Changeset 8413 for trunk


Ignore:
Timestamp:
08/06/12 14:23:28 (12 years ago)
Author:
ascheibe
Message:

#1331 fixed memory allocation in CalculateSolutionCrowdSimilarity

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Optimization.Operators/3.3/SolutionSimilarityCalculator.cs

    r8334 r8413  
    6969
    7070      var similarityMatrix = new double[individuals.Count][];
     71      for (int i = 0; i < individuals.Count; i++) similarityMatrix[i] = new double[individuals.Count];
     72
    7173      for (int i = 0; i < individuals.Count; i++) {
    72         similarityMatrix[i] = new double[individuals.Count];
    7374        for (int j = i; j < individuals.Count; j++) {
    7475          similarityMatrix[i][j] = similarityMatrix[j][i] = CalculateSolutionSimilarity(individuals[i], individuals[j]);
Note: See TracChangeset for help on using the changeset viewer.