Changeset 12891 for branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreeBottomUpSimilarityCalculator.cs
- Timestamp:
- 08/22/15 14:27:37 (9 years ago)
- Location:
- branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic
- Property svn:mergeinfo changed
-
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreeBottomUpSimilarityCalculator.cs
r12287 r12891 1 1 #region License Information 2 2 3 /* HeuristicLab 3 4 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) … … 18 19 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 20 */ 20 #endregion 21 22 #endregion License Information 21 23 22 24 using System; … … 32 34 33 35 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { 36 34 37 [StorableClass] 35 38 [Item("SymbolicExpressionTreeBottomUpSimilarityCalculator", "A similarity calculator which uses the tree bottom-up distance as a similarity metric.")] … … 37 40 private readonly HashSet<string> commutativeSymbols = new HashSet<string> { "Addition", "Multiplication", "Average", "And", "Or", "Xor" }; 38 41 39 public SymbolicExpressionTreeBottomUpSimilarityCalculator() { } 42 public SymbolicExpressionTreeBottomUpSimilarityCalculator() { 43 } 44 40 45 protected override bool IsCommutative { get { return true; } } 41 46 … … 107 112 108 113 // at this point we know that v and w are isomorphic, however, the mapping cannot be done directly 109 // (as in the paper) because the trees are unordered (subtree order might differ). the solution is 114 // (as in the paper) because the trees are unordered (subtree order might differ). the solution is 110 115 // to sort subtrees from under commutative labels (this will work because the subtrees are isomorphic!) 111 116 // while iterating over the two subtrees
Note: See TracChangeset
for help on using the changeset viewer.