Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/09/14 14:25:57 (9 years ago)
Author:
bgoldman
Message:

#2282 Commenting, added some basic unit tests for P3.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/Parameter-less Population Pyramid/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/LinkageTree.cs

    r11669 r11672  
    7575    // While "total" always has an integer value, it is a double to reduce
    7676    // how often type casts are needed to prevent integer divison
     77    // In the GECCO paper, calculates Equation 2
    7778    private static double NegativeEntropy(int[] counts, double total) {
    7879      double sum = 0;
     
    8586    }
    8687
     88    // Uses the frequency table to calcuate the entropy distance between two indices.
     89    // In the GECCO paper, calculates Equation 1
    8790    private double EntropyDistance(int i, int j) {
    8891      // This ensures you are using the lower triangular part of "occurances"
     
    111114    }
    112115
     116    // Performs O(N^2) clustering based on the method described in:
     117    // "Optimal implementations of UPGMA and other common clustering algorithms"
     118    // by I. Gronau and S. Moran
     119    // In the GECCO paper, Figure 2 is a simplified version of this algorithm.
    113120    private void Rebuild() {
    114121      // Keep track of which clusters have not been merged
     
    160167          topLevel.Swap(end_of_path, best_index);
    161168          end_of_path++;
    162 
    163169        }
    164170        // Last two elements in the path are the clusters to join
Note: See TracChangeset for help on using the changeset viewer.