Changeset 10755 for branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Tracking
- Timestamp:
- 04/16/14 17:15:33 (11 years ago)
- Location:
- branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Tracking
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Tracking/FragmentGraphView.cs
r10752 r10755 2 2 using System.Drawing; 3 3 using System.Linq; 4 using HeuristicLab.Common; 4 5 using HeuristicLab.Core.Views; 5 6 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; … … 93 94 var aPos = aTile.Position; 94 95 95 if (node.Content.Index > 0) { 96 var subtree = node.Content.Root.NodeAt(node.Content.Index); 97 foreach (var s in subtree.IterateNodesPrefix()) { 96 if (node.Rank.IsAlmost(0)) { 97 foreach (var s in node.Content.Root.IterateNodesPrefix()) { 98 98 var primitive = aTile.GetPrimitive(s); 99 99 if (primitive != null) { 100 100 var rpb = primitive as RectangularPrimitiveBase; 101 101 if (rpb != null) { 102 rpb.Pen = new Pen(Color.RoyalBlue); 102 rpb.Pen = new Pen(Color.ForestGreen); 103 } 104 } 105 } 106 } else { 107 108 if (node.Content.Index1 > 0) { 109 var subtree = node.Content.Root.NodeAt(node.Content.Index1); 110 foreach (var s in subtree.IterateNodesPrefix()) { 111 var primitive = aTile.GetPrimitive(s); 112 if (primitive != null) { 113 var rpb = primitive as RectangularPrimitiveBase; 114 if (rpb != null) { 115 rpb.Pen = new Pen(Color.RoyalBlue); 116 } 103 117 } 104 118 } … … 115 129 116 130 if (child == node.Children.First()) { 117 if (node.Content.Index > 0) {118 var subtree = child.Content.Root.NodeAt(node.Content.Index );131 if (node.Content.Index1 > 0) { 132 var subtree = child.Content.Root.NodeAt(node.Content.Index1); 119 133 foreach (var s in subtree.IterateNodesPrefix()) { 120 134 var primitive = bTile.GetPrimitive(s); -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Tracking/SymboldDataAnalysisGenealogyView.cs
r10752 r10755 81 81 var fragment = (IFragment<ISymbolicExpressionTreeNode>)graphNode.InArcs.Last().Data; 82 82 if (fragment != null) { 83 treeChart_HighlightSubtree( fragment.Root);83 treeChart_HighlightSubtree(graphNode.Content.NodeAt(fragment.Index1)); 84 84 } 85 85 } … … 101 101 var subtreeIndex = graphNode.Content.IterateNodesPrefix().ToList().IndexOf(subtree); 102 102 var fragmentGraph = SymbolicDataAnalysisExpressionTracing.TraceSubtree(graphNode, subtreeIndex); 103 MainFormManager.MainForm.ShowContent(fragmentGraph); // display the fragment graph on the screen 103 if (fragmentGraph.Nodes.Any()) { 104 MainFormManager.MainForm.ShowContent(fragmentGraph); // display the fragment graph on the screen 105 } 104 106 } else { 105 107 // perform matching like it was done before … … 108 110 var matchingTrees = trees.Where(x => x.Root.ContainsSubtree(subtree, comparer)); 109 111 110 var matchingVertices = matchingTrees.Select Many(x => Content[x]).Cast<IGenealogyGraphNode<ISymbolicExpressionTree>>();112 var matchingVertices = matchingTrees.Select(x => Content[x]).Cast<IGenealogyGraphNode<ISymbolicExpressionTree>>(); 111 113 graphChart_highlightMatchingVertices(matchingVertices); 112 114 }
Note: See TracChangeset
for help on using the changeset viewer.