Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/27/14 20:47:37 (9 years ago)
Author:
bburlacu
Message:

#1772: Updated views (fixed position and anchors).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Tracking/SymboldDataAnalysisGenealogyView.cs

    r11503 r11506  
    7878      var tree = graphNode.Data;
    7979      symbolicExpressionTreeChart.Tree = tree;
    80 
    8180      if (graphNode.InArcs.Any()) {
    8281        var fragment = graphNode.InArcs.Last().Data as IFragment<ISymbolicExpressionTreeNode>;
    8382        if (fragment != null) {
    8483          treeChart_HighlightSubtree(graphNode.Data.NodeAt(fragment.Index1));
    85         } else {
    86           var td = graphNode.InArcs.Last().Data as Tuple<int, int, int, int>;
    87           if (td != null) {
    88             var s = graphNode.Data.NodeAt(td.Item1);
    89             var f = graphNode.Data.NodeAt(td.Item2);
    90             treeChart_HighlightSubtree(s, Color.Orange);
    91             treeChart_HighlightSubtree(f, Color.RoyalBlue);
    92           }
     84        }
     85      }
     86      if (graphNode.OutArcs.Any()) {
     87        var td = graphNode.OutArcs.Last().Data as Tuple<int, int, int, int>;
     88        if (td != null) {
     89          var s = graphNode.Data.NodeAt(td.Item3); // subtree index
     90          var f = graphNode.Data.NodeAt(td.Item4); // fragment index
     91          treeChart_HighlightSubtree(s, Color.Orange);
     92          treeChart_HighlightSubtree(f, Color.RoyalBlue);
    9393        }
    9494      }
     
    9898      var visualNode = (VisualGenealogyGraphNode)sender;
    9999      var graphNode = (IGenealogyGraphNode<ISymbolicExpressionTree>)visualNode.Data;
    100       var tree = graphNode.Data;
    101       MainFormManager.MainForm.ShowContent(tree);
     100      //      var tree = graphNode.Data;
     101      //      var model = new RegressionModel();
     102      //      var solution = new RegressionSolution()
     103      //      MainFormManager.MainForm.ShowContent(tree);
    102104    }
    103105
     
    117119        var subtreeIndex = graphNode.Data.IterateNodesPrefix().ToList().IndexOf(subtree);
    118120        var fragmentGraph = SymbolicDataAnalysisExpressionTracing.TraceSubtree(graphNode, subtreeIndex);
     121
    119122        if (fragmentGraph.Vertices.Any()) {
     123          var genealogyNodes = fragmentGraph.Vertices.Select(v => Content.GetByContent(v.Data));
     124          genealogyGraphChart.HighlightNodes(genealogyNodes);
     125          foreach (var a in fragmentGraph.Arcs) {
     126            genealogyGraphChart.HighlightArc(Content.GetByContent(a.Target.Data), Content.GetByContent(a.Source.Data));
     127          }
    120128          MainFormManager.MainForm.ShowContent(fragmentGraph); // display the fragment graph on the screen
    121129        }
Note: See TracChangeset for help on using the changeset viewer.