Changeset 11233 for branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Tracking/SymbolicDataAnalysisExpressionTracing.cs
- Timestamp:
- 07/30/14 01:41:54 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Tracking/SymbolicDataAnalysisExpressionTracing.cs
r10888 r11233 30 30 public static class SymbolicDataAnalysisExpressionTracing { 31 31 public static FragmentGraph TraceSubtree(IGenealogyGraphNode<ISymbolicExpressionTree> graphNode, int subtreeIndex) { 32 var graph = new FragmentGraph { AllowDuplicateContent = true };32 var graph = new FragmentGraph(); 33 33 var nodes = Trace(graphNode, subtreeIndex); 34 34 foreach (var n in nodes) { … … 51 51 while (true) { 52 52 if (!node.Parents.Any()) { 53 var fragmentNode = new FragmentNode { 54 Content = node, 53 var fragmentNode = new FragmentNode(node) { 55 54 SubtreeIndex = index, 56 55 }; 57 56 if (parent != null) { 58 57 var arc = new Arc(parent, fragmentNode); 59 parent.AddForwardArc(arc); 60 fragmentNode.AddReverseArc(arc); 58 parent.AddArc(arc); 59 fragmentNode.AddArc(arc); 60 61 // parent.AddForwardArc(arc); 62 // fragmentNode.AddReverseArc(arc); 61 63 } 62 64 yield return fragmentNode; // no tracing if there are no parents … … 79 81 if (parents.Count == 1) { 80 82 // we are tracing a mutation operation 81 var fragmentNode = new FragmentNode { 82 Content = node, 83 var fragmentNode = new FragmentNode(node) { 83 84 SubtreeIndex = index, 84 85 FragmentIndex = fragment.Index1 … … 86 87 if (parent != null) { 87 88 var arc = new Arc(parent, fragmentNode); 88 parent.Add ForwardArc(arc);89 fragmentNode.Add ReverseArc(arc);89 parent.AddArc(arc); 90 fragmentNode.AddArc(arc); 90 91 } 91 92 node = parents[0]; … … 138 139 if (fragment.Index1 < index + subtreeLength) { 139 140 // subtree contains fragment => bifurcation point in the fragment graph 140 var fragmentNode = new FragmentNode { 141 Content = node, 141 var fragmentNode = new FragmentNode(node) { 142 142 SubtreeIndex = index, 143 143 FragmentIndex = fragment.Index1 … … 145 145 if (parent != null) { 146 146 var arc = new Arc(parent, fragmentNode); 147 parent.Add ForwardArc(arc);148 fragmentNode.Add ReverseArc(arc);147 parent.AddArc(arc); 148 fragmentNode.AddArc(arc); 149 149 } 150 150 yield return fragmentNode;
Note: See TracChangeset
for help on using the changeset viewer.