Changeset 14634 for branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic
- Timestamp:
- 02/01/17 16:43:54 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/QueryMatch.cs
r14426 r14634 35 35 private readonly ISymbolicExpressionTreeNodeComparer nodeComparer = new SymbolicExpressionTreeNodeComparer(); 36 36 37 private readonly Dictionary<ISymbolicExpressionTreeNode, List<NodeInfo>> cache = new Dictionary<ISymbolicExpressionTreeNode, List<NodeInfo>>(); 38 39 public void ClearCache() { 40 cache.Clear(); 41 } 42 37 43 private QueryMatch() { } 38 44 … … 63 69 return false; 64 70 65 var dNodes = InitializePostOrder(data); 66 var qNodes = InitializePostOrder(query); 71 List<NodeInfo> dNodes, qNodes; 72 73 if (!cache.TryGetValue(data, out dNodes)) { 74 dNodes = InitializePostOrder(data); 75 cache[data] = dNodes; 76 } 77 78 if (!cache.TryGetValue(query, out qNodes)) { 79 qNodes = InitializePostOrder(query); 80 cache[query] = qNodes; 81 } 67 82 68 83 var dRoot = dNodes.Last();
Note: See TracChangeset
for help on using the changeset viewer.