Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/23/16 19:31:18 (8 years ago)
Author:
bburlacu
Message:

#2685: Add correction step for values miscalculated due to cyclical symbol dependencies in the grammar. Updated unit test.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreeBottomUpSimilarityCalculator.cs

    r14185 r14353  
    6161    }
    6262
     63    public static double CalculateBottomUpSimilarity(ISymbolicExpressionTree t1, ISymbolicExpressionTree t2) {
     64      return new SymbolicExpressionTreeBottomUpSimilarityCalculator().CalculateSimilarity(t1, t2);
     65    }
     66
    6367    public override double CalculateSolutionSimilarity(IScope leftSolution, IScope rightSolution) {
    6468      if (leftSolution == rightSolution)
     
    7377      var similarity = CalculateSimilarity(t1, t2);
    7478      if (similarity > 1.0)
    75         throw new Exception("Similarity value cannot be greater than 1");
     79        throw new Exception("Similarity value " + similarity + " cannot be greater than 1");
    7680
    7781      return similarity;
Note: See TracChangeset for help on using the changeset viewer.