Changeset 7817 for branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking.Views
- Timestamp:
- 05/15/12 00:21:10 (12 years ago)
- Location:
- branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking.Views/3.4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking.Views/3.4/GenealogyGraphChart.cs
r7792 r7817 160 160 // color selected node and its genealogy 161 161 if (_selectedGenealogyGraphNode == null) return; 162 var gNode = _selectedGenealogyGraphNode.Data; // genealogy graph node (representing an individual in the population)163 double rank = gNode.Rank;164 var ancestors = gNode.Ancestors().Where(a => a.Rank < rank).ToList();165 ancestors.Add(gNode);166 162 // use special highlighting for the currently selected genealogy graph node 167 163 var center = _selectedGenealogyGraphNode.Center; … … 174 170 Chart.Group.Add(_targetRectangle); 175 171 } 172 var gNode = _selectedGenealogyGraphNode.Data; // genealogy graph node (representing an individual in the population) 173 double rank = gNode.Rank; 174 var ancestors = gNode.Ancestors().Where(a => a.Rank < rank).ToList(); 175 ancestors.Add(gNode); 176 176 // highlight selected node and its ancestry 177 177 foreach (var node in ancestors.SelectMany(n => _visualNodeMap[n])) { … … 206 206 if (_selectedGenealogyGraphNode != null) 207 207 /* emit clicked event */ 208 OnGenealogyGraphNodeClicked(_selectedGenealogyGraphNode, e);208 GenealogyGraphNodeClicked(_selectedGenealogyGraphNode, e); 209 209 } 210 210 } -
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking.Views/3.4/GenealogyGraphView.cs
r7800 r7817 97 97 int index = SymbolicExpressionTreeMatching.FindMatch(nodes, fragments, similarityModeSelector.SelectedIndex); 98 98 if (index != -1) { 99 _selectedVisualSymbolicExpressionTreeNode = symbolicExpressionTreeChart.GetVisualSymbolicExpressionTreeNode(nodes[index + fragments.Count - 1]);99 _selectedVisualSymbolicExpressionTreeNode = symbolicExpressionTreeChart.GetVisualSymbolicExpressionTreeNode(nodes[index]); 100 100 var subtree = _selectedVisualSymbolicExpressionTreeNode.SymbolicExpressionTreeNode; 101 101 foreach (var visualNode in subtree.IterateNodesBreadth().Select(node => symbolicExpressionTreeChart.GetVisualSymbolicExpressionTreeNode(node))) { … … 111 111 if (arc != null) { 112 112 var fragment = arc.Data as ISymbolicExpressionTreeNode; 113 //var fragmentNodes = fragment.IterateNodesBreadth() as List<ISymbolicExpressionTreeNode>;114 //var treeNodes = tree.IterateNodesBreadth() as List<ISymbolicExpressionTreeNode>;115 //var idx = SymbolicExpressionTreeMatching.FindMatch(treeNodes, fragmentNodes, (int)SymbolicExpressionTreeMatching.SimilarityLevel.Exact);116 113 foreach (var node in fragment.IterateNodesBreadth()) { 117 114 var visualNode = symbolicExpressionTreeChart.GetVisualSymbolicExpressionTreeNode(node); … … 121 118 } 122 119 } 123 // what's left to be done here is to:124 // - get the symbolic expression tree125 // - get the corresponding fragment126 // - for all symbolic expression tree nodes in the fragment, colorize the corresponding visual nodes127 // - repaint the tree128 120 } 129 121
Note: See TracChangeset
for help on using the changeset viewer.