Free cookie consent management tool by TermsFeed Policy Generator

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

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

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/SymboldDataAnalysisGenealogyView.Designer.cs

    r10888 r11506  
    4949      this.components = new System.ComponentModel.Container();
    5050      this.splitContainer1 = new System.Windows.Forms.SplitContainer();
    51       this.genealogyGraphChart = new HeuristicLab.Problems.DataAnalysis.Symbolic.Views.SymbolicDataAnalysisExpressionGenealogyGraphChart();
    5251      this.symbolicExpressionTreeChart = new HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views.SymbolicExpressionTreeChart();
    5352      this.groupBox1 = new System.Windows.Forms.GroupBox();
     53      this.hotPaths_button = new System.Windows.Forms.Button();
    5454      this.simpleLineages_checkBox = new System.Windows.Forms.CheckBox();
    5555      this.lockGraph_checkBox = new System.Windows.Forms.CheckBox();
    5656      this.trace_checkBox = new System.Windows.Forms.CheckBox();
    57       this.hotPaths_button = new System.Windows.Forms.Button();
     57      this.genealogyGraphChart = new HeuristicLab.Problems.DataAnalysis.Symbolic.Views.SymbolicDataAnalysisExpressionGenealogyGraphChart();
    5858      ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
    5959      this.splitContainer1.Panel1.SuspendLayout();
     
    6565      // splitContainer1
    6666      //
     67      this.splitContainer1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     68            | System.Windows.Forms.AnchorStyles.Left)
     69            | System.Windows.Forms.AnchorStyles.Right)));
    6770      this.splitContainer1.Location = new System.Drawing.Point(0, 57);
    6871      this.splitContainer1.Name = "splitContainer1";
     
    7578      //
    7679      this.splitContainer1.Panel2.Controls.Add(this.symbolicExpressionTreeChart);
    77       this.splitContainer1.Size = new System.Drawing.Size(1247, 698);
    78       this.splitContainer1.SplitterDistance = 607;
     80      this.splitContainer1.Size = new System.Drawing.Size(1244, 695);
     81      this.splitContainer1.SplitterDistance = 605;
    7982      this.splitContainer1.TabIndex = 0;
    8083      //
    81       // genealogyGraphChart
    82       //
    83       this.genealogyGraphChart.BackColor = System.Drawing.SystemColors.Control;
    84       this.genealogyGraphChart.Dock = System.Windows.Forms.DockStyle.Fill;
    85       this.genealogyGraphChart.GenealogyGraph = null;
    86       this.genealogyGraphChart.Location = new System.Drawing.Point(0, 0);
    87       this.genealogyGraphChart.LockGenealogy = false;
    88       this.genealogyGraphChart.Name = "genealogyGraphChart";
    89       this.genealogyGraphChart.ScaleOnResize = true;
    90       this.genealogyGraphChart.SimpleLineages = false;
    91       this.genealogyGraphChart.Size = new System.Drawing.Size(607, 698);
    92       this.genealogyGraphChart.TabIndex = 0;
    93       this.genealogyGraphChart.TraceFragments = false;
    94       //
    9584      // symbolicExpressionTreeChart
    9685      //
     86      this.symbolicExpressionTreeChart.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     87            | System.Windows.Forms.AnchorStyles.Left)
     88            | System.Windows.Forms.AnchorStyles.Right)));
    9789      this.symbolicExpressionTreeChart.BackgroundColor = System.Drawing.Color.White;
    98       this.symbolicExpressionTreeChart.Dock = System.Windows.Forms.DockStyle.Fill;
    9990      this.symbolicExpressionTreeChart.LineColor = System.Drawing.Color.Black;
    10091      this.symbolicExpressionTreeChart.Location = new System.Drawing.Point(0, 0);
    10192      this.symbolicExpressionTreeChart.Name = "symbolicExpressionTreeChart";
    102       this.symbolicExpressionTreeChart.Size = new System.Drawing.Size(636, 698);
     93      this.symbolicExpressionTreeChart.Size = new System.Drawing.Size(635, 692);
    10394      this.symbolicExpressionTreeChart.Spacing = 5;
    10495      this.symbolicExpressionTreeChart.SuspendRepaint = false;
     
    109100      // groupBox1
    110101      //
     102      this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     103            | System.Windows.Forms.AnchorStyles.Right)));
    111104      this.groupBox1.Controls.Add(this.hotPaths_button);
    112105      this.groupBox1.Controls.Add(this.simpleLineages_checkBox);
     
    115108      this.groupBox1.Location = new System.Drawing.Point(3, 3);
    116109      this.groupBox1.Name = "groupBox1";
    117       this.groupBox1.Size = new System.Drawing.Size(1195, 48);
     110      this.groupBox1.Size = new System.Drawing.Size(1241, 48);
    118111      this.groupBox1.TabIndex = 4;
    119112      this.groupBox1.TabStop = false;
    120113      this.groupBox1.Text = "Controls";
     114      //
     115      // hotPaths_button
     116      //
     117      this.hotPaths_button.Location = new System.Drawing.Point(263, 15);
     118      this.hotPaths_button.Name = "hotPaths_button";
     119      this.hotPaths_button.Size = new System.Drawing.Size(75, 23);
     120      this.hotPaths_button.TabIndex = 7;
     121      this.hotPaths_button.Text = "Hot paths";
     122      this.hotPaths_button.UseVisualStyleBackColor = true;
     123      this.hotPaths_button.Click += new System.EventHandler(this.hotPaths_button_Click);
    121124      //
    122125      // simpleLineages_checkBox
     
    153156      this.trace_checkBox.CheckedChanged += new System.EventHandler(this.trace_checkBox_CheckedChanged);
    154157      //
    155       // hotPaths_button
    156       //
    157       this.hotPaths_button.Location = new System.Drawing.Point(263, 15);
    158       this.hotPaths_button.Name = "hotPaths_button";
    159       this.hotPaths_button.Size = new System.Drawing.Size(75, 23);
    160       this.hotPaths_button.TabIndex = 7;
    161       this.hotPaths_button.Text = "Hot paths";
    162       this.hotPaths_button.UseVisualStyleBackColor = true;
    163       this.hotPaths_button.Click += new System.EventHandler(this.hotPaths_button_Click);
     158      // genealogyGraphChart
     159      //
     160      this.genealogyGraphChart.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     161            | System.Windows.Forms.AnchorStyles.Left)
     162            | System.Windows.Forms.AnchorStyles.Right)));
     163      this.genealogyGraphChart.BackColor = System.Drawing.SystemColors.Control;
     164      this.genealogyGraphChart.GenealogyGraph = null;
     165      this.genealogyGraphChart.Location = new System.Drawing.Point(-5, 0);
     166      this.genealogyGraphChart.LockGenealogy = false;
     167      this.genealogyGraphChart.Name = "genealogyGraphChart";
     168      this.genealogyGraphChart.ScaleOnResize = true;
     169      this.genealogyGraphChart.SimpleLineages = false;
     170      this.genealogyGraphChart.Size = new System.Drawing.Size(607, 692);
     171      this.genealogyGraphChart.TabIndex = 0;
     172      this.genealogyGraphChart.TraceFragments = false;
    164173      //
    165174      // SymboldDataAnalysisGenealogyView
  • 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.