Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/21/14 19:56:48 (10 years ago)
Author:
bburlacu
Message:

#2215: Renamed BottomUpTreeSimilarityCalculator to BottomUpSimilarityCalculator, improved performance by 10% by using the SymbolicExpressionTreeNodeComparer for ordering nodes (instead of string.Compare on node.ToString()). Updated the rest of the files accordingly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.BottomUpTreeDistance/HeuristicLab.Tests/BottomUpTreeSimilarityCalculatorTest.cs

    r11244 r11486  
    1414  [TestClass]
    1515  public class BottomUpSimilarityCalculatorTest {
    16     private readonly BottomUpTreeSimilarityCalculator busCalculator;
     16    private readonly BottomUpSimilarityCalculator busCalculator;
    1717    private readonly SymbolicExpressionImporter importer;
    1818
     
    2222
    2323    public BottomUpSimilarityCalculatorTest() {
    24       busCalculator = new BottomUpTreeSimilarityCalculator(new List<string> { "Addition", "Multiplication", "And", "Or", "Xor" });
     24      busCalculator = new BottomUpSimilarityCalculator { MatchConstantValues = true, MatchVariableWeights = true };
    2525      importer = new SymbolicExpressionImporter();
    2626    }
     
    8585      for (int i = 0; i < trees.Length - 1; ++i) {
    8686        for (int j = i + 1; j < trees.Length; ++j) {
    87           s += busCalculator.CalculateSolutionSimilarity(trees[i], trees[j]);
     87          s += busCalculator.CalculateSimilarity(trees[i], trees[j]);
    8888        }
    8989      }
Note: See TracChangeset for help on using the changeset viewer.