Changeset 10746 for branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4
- Timestamp:
- 04/14/14 17:15:32 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Matching/SymbolicExpressionTreeMatching.cs
r10650 r10746 16 16 public static IEnumerable<ISymbolicExpressionTreeNode> FindMatches(ISymbolicExpressionTreeNode root, ISymbolicExpressionTreeNode subtree, ISymbolicExpressionTreeNodeSimilarityComparer comp) { 17 17 var fragmentLength = subtree.GetLength(); 18 // below, we use ">=" for Match(n, subtree, comp) >= fragmentLength because in case of relaxed conditions, 19 // we can have multiple matches of the same node 20 21 return root.IterateNodesBreadth().Where(n => n.GetLength() >= fragmentLength && Match(n, subtree, comp) == fragmentLength); 18 return root.IterateNodesBreadth().Where(n => n.GetLength() >= fragmentLength && Match(n, subtree, comp) >= fragmentLength); 22 19 } 23 20
Note: See TracChangeset
for help on using the changeset viewer.