Changeset 11910 for branches/HeuristicLab.BottomUpTreeDistance/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreeMatching.cs
- Timestamp:
- 02/05/15 12:09:18 (10 years ago)
- Location:
- branches/HeuristicLab.BottomUpTreeDistance/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.BottomUpTreeDistance/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreeMatching.cs
r11887 r11910 30 30 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { 31 31 public static class SymbolicExpressionTreeMatching { 32 public static bool ContainsSubtree(this ISymbolicExpressionTreeNode root, ISymbolicExpressionTreeNode subtree, SymbolicExpressionTreeNode SimilarityComparer comparer) {32 public static bool ContainsSubtree(this ISymbolicExpressionTreeNode root, ISymbolicExpressionTreeNode subtree, SymbolicExpressionTreeNodeEqualityComparer comparer) { 33 33 return FindMatches(root, subtree, comparer).Any(); 34 34 } 35 public static IEnumerable<ISymbolicExpressionTreeNode> FindMatches(ISymbolicExpressionTree tree, ISymbolicExpressionTreeNode subtree, SymbolicExpressionTreeNode SimilarityComparer comparer) {35 public static IEnumerable<ISymbolicExpressionTreeNode> FindMatches(ISymbolicExpressionTree tree, ISymbolicExpressionTreeNode subtree, SymbolicExpressionTreeNodeEqualityComparer comparer) { 36 36 return FindMatches(tree.Root, subtree, comparer); 37 37 } 38 38 39 public static IEnumerable<ISymbolicExpressionTreeNode> FindMatches(ISymbolicExpressionTreeNode root, ISymbolicExpressionTreeNode subtree, SymbolicExpressionTreeNode SimilarityComparer comp) {39 public static IEnumerable<ISymbolicExpressionTreeNode> FindMatches(ISymbolicExpressionTreeNode root, ISymbolicExpressionTreeNode subtree, SymbolicExpressionTreeNodeEqualityComparer comp) { 40 40 var fragmentLength = subtree.GetLength(); 41 41 // below, we use ">=" for Match(n, subtree, comp) >= fragmentLength because in case of relaxed conditions,
Note: See TracChangeset
for help on using the changeset viewer.