Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/02/15 17:23:33 (10 years ago)
Author:
bburlacu
Message:

#1772: Improved functionality of the SymbolicDataAnalysisGenealogyGraphView in terms of graph navigation and display of useful information. Fixed save of tree image to file in the SymbolicExpressionTreeChart.

Location:
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4
Files:
6 added
3 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Views-3.4.csproj

    r11817 r11864  
    219219    <Compile Include="MenuItems\OptimizeDataAnalysisRunsMenuItem.cs" />
    220220    <Compile Include="Plugin.cs" />
     221    <Compile Include="Properties\Resources.Designer.cs">
     222      <AutoGen>True</AutoGen>
     223      <DesignTime>True</DesignTime>
     224      <DependentUpon>Resources.resx</DependentUpon>
     225    </Compile>
    221226    <Compile Include="SlidingWindowDataView.cs">
    222227      <SubType>UserControl</SubType>
     
    371376      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    372377    </Content>
     378    <None Include="Resources\LargeLeftDiagonal_235.png" />
     379    <None Include="Resources\LargeRightDiagonal_238.png" />
     380  </ItemGroup>
     381  <ItemGroup>
     382    <EmbeddedResource Include="Properties\Resources.resx">
     383      <Generator>ResXFileCodeGenerator</Generator>
     384      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
     385      <SubType>Designer</SubType>
     386    </EmbeddedResource>
     387    <EmbeddedResource Include="Tracking\SymbolicDataAnalysisGenealogyGraphView.resx">
     388      <DependentUpon>SymbolicDataAnalysisGenealogyGraphView.cs</DependentUpon>
     389    </EmbeddedResource>
    373390  </ItemGroup>
    374391  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Tracking/SymbolicDataAnalysisGenealogyGraphView.Designer.cs

    r11817 r11864  
    4545    /// </summary>
    4646    private void InitializeComponent() {
    47       this.components = new System.ComponentModel.Container();
     47      this.groupBox1 = new System.Windows.Forms.GroupBox();
     48      this.navigateRightButton = new System.Windows.Forms.Button();
     49      this.navigateLeftButton = new System.Windows.Forms.Button();
     50      this.nodeDegreeLabel = new System.Windows.Forms.Label();
     51      this.nodeDegreeLabelLabel = new System.Windows.Forms.Label();
     52      this.nodeRankLabel = new System.Windows.Forms.Label();
     53      this.nodeRankLabelLabel = new System.Windows.Forms.Label();
     54      this.nodeQualityLabel = new System.Windows.Forms.Label();
     55      this.nodeQualityLabelLabel = new System.Windows.Forms.Label();
     56      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
     57      this.splitContainer.Panel1.SuspendLayout();
     58      this.splitContainer.Panel2.SuspendLayout();
     59      this.splitContainer.SuspendLayout();
     60      this.groupBox1.SuspendLayout();
    4861      this.SuspendLayout();
     62      //
     63      // splitContainer
     64      //
     65      //
     66      // genealogyGraphChart
     67      //
     68      this.genealogyGraphChart.Size = new System.Drawing.Size(692, 697);
     69      //
     70      // groupBox1
     71      //
     72      this.groupBox1.Controls.Add(this.navigateRightButton);
     73      this.groupBox1.Controls.Add(this.navigateLeftButton);
     74      this.groupBox1.Controls.Add(this.nodeDegreeLabel);
     75      this.groupBox1.Controls.Add(this.nodeDegreeLabelLabel);
     76      this.groupBox1.Controls.Add(this.nodeRankLabel);
     77      this.groupBox1.Controls.Add(this.nodeRankLabelLabel);
     78      this.groupBox1.Controls.Add(this.nodeQualityLabel);
     79      this.groupBox1.Controls.Add(this.nodeQualityLabelLabel);
     80      this.groupBox1.Location = new System.Drawing.Point(420, 4);
     81      this.groupBox1.Name = "groupBox1";
     82      this.groupBox1.Size = new System.Drawing.Size(624, 44);
     83      this.groupBox1.TabIndex = 2;
     84      this.groupBox1.TabStop = false;
     85      this.groupBox1.Text = "Current Node";
     86      //
     87      // navigateRightButton
     88      //
     89      this.navigateRightButton.Image = global::HeuristicLab.Problems.DataAnalysis.Symbolic.Views.Properties.Resources.LargeLeftDiagonal_235;
     90      this.navigateRightButton.Location = new System.Drawing.Point(309, 15);
     91      this.navigateRightButton.Name = "navigateRightButton";
     92      this.navigateRightButton.Size = new System.Drawing.Size(22, 22);
     93      this.navigateRightButton.TabIndex = 6;
     94      this.navigateRightButton.UseVisualStyleBackColor = true;
     95      this.navigateRightButton.Click += new System.EventHandler(this.navigateRightButton_Click);
     96      //
     97      // navigateLeftButton
     98      //
     99      this.navigateLeftButton.Image = global::HeuristicLab.Problems.DataAnalysis.Symbolic.Views.Properties.Resources.LargeRightDiagonal_238;
     100      this.navigateLeftButton.Location = new System.Drawing.Point(281, 15);
     101      this.navigateLeftButton.Name = "navigateLeftButton";
     102      this.navigateLeftButton.Size = new System.Drawing.Size(22, 22);
     103      this.navigateLeftButton.TabIndex = 6;
     104      this.navigateLeftButton.UseVisualStyleBackColor = true;
     105      this.navigateLeftButton.Click += new System.EventHandler(this.navigateLeftButton_Click);
     106      //
     107      // nodeDegreeLabel
     108      //
     109      this.nodeDegreeLabel.AutoSize = true;
     110      this.nodeDegreeLabel.Location = new System.Drawing.Point(235, 20);
     111      this.nodeDegreeLabel.Name = "nodeDegreeLabel";
     112      this.nodeDegreeLabel.Size = new System.Drawing.Size(0, 13);
     113      this.nodeDegreeLabel.TabIndex = 5;
     114      //
     115      // nodeDegreeLabelLabel
     116      //
     117      this.nodeDegreeLabelLabel.AutoSize = true;
     118      this.nodeDegreeLabelLabel.Location = new System.Drawing.Point(192, 20);
     119      this.nodeDegreeLabelLabel.Name = "nodeDegreeLabelLabel";
     120      this.nodeDegreeLabelLabel.Size = new System.Drawing.Size(45, 13);
     121      this.nodeDegreeLabelLabel.TabIndex = 4;
     122      this.nodeDegreeLabelLabel.Text = "Degree:";
     123      //
     124      // nodeRankLabel
     125      //
     126      this.nodeRankLabel.AutoSize = true;
     127      this.nodeRankLabel.Location = new System.Drawing.Point(138, 20);
     128      this.nodeRankLabel.Name = "nodeRankLabel";
     129      this.nodeRankLabel.Size = new System.Drawing.Size(0, 13);
     130      this.nodeRankLabel.TabIndex = 3;
     131      //
     132      // nodeRankLabelLabel
     133      //
     134      this.nodeRankLabelLabel.AutoSize = true;
     135      this.nodeRankLabelLabel.Location = new System.Drawing.Point(96, 20);
     136      this.nodeRankLabelLabel.Name = "nodeRankLabelLabel";
     137      this.nodeRankLabelLabel.Size = new System.Drawing.Size(36, 13);
     138      this.nodeRankLabelLabel.TabIndex = 2;
     139      this.nodeRankLabelLabel.Text = "Rank:";
     140      //
     141      // nodeQualityLabel
     142      //
     143      this.nodeQualityLabel.AutoSize = true;
     144      this.nodeQualityLabel.Location = new System.Drawing.Point(54, 20);
     145      this.nodeQualityLabel.Name = "nodeQualityLabel";
     146      this.nodeQualityLabel.Size = new System.Drawing.Size(0, 13);
     147      this.nodeQualityLabel.TabIndex = 1;
     148      //
     149      // nodeQualityLabelLabel
     150      //
     151      this.nodeQualityLabelLabel.AutoSize = true;
     152      this.nodeQualityLabelLabel.Location = new System.Drawing.Point(6, 20);
     153      this.nodeQualityLabelLabel.Name = "nodeQualityLabelLabel";
     154      this.nodeQualityLabelLabel.Size = new System.Drawing.Size(42, 13);
     155      this.nodeQualityLabelLabel.TabIndex = 0;
     156      this.nodeQualityLabelLabel.Text = "Quality:";
    49157      //
    50158      // SymbolicDataAnalysisGenealogyGraphView
     
    52160      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    53161      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     162      this.Controls.Add(this.groupBox1);
    54163      this.Name = "SymbolicDataAnalysisGenealogyGraphView";
    55164      this.Size = new System.Drawing.Size(1247, 755);
     165      this.Controls.SetChildIndex(this.splitContainer, 0);
     166      this.Controls.SetChildIndex(this.groupBox1, 0);
     167      this.splitContainer.Panel1.ResumeLayout(false);
     168      this.splitContainer.Panel2.ResumeLayout(false);
     169      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit();
     170      this.splitContainer.ResumeLayout(false);
     171      this.groupBox1.ResumeLayout(false);
     172      this.groupBox1.PerformLayout();
    56173      this.ResumeLayout(false);
     174
    57175    }
    58176
    59177    #endregion
     178
     179    private System.Windows.Forms.GroupBox groupBox1;
     180    private System.Windows.Forms.Label nodeQualityLabelLabel;
     181    private System.Windows.Forms.Label nodeQualityLabel;
     182    private System.Windows.Forms.Label nodeRankLabelLabel;
     183    private System.Windows.Forms.Label nodeRankLabel;
     184    private System.Windows.Forms.Label nodeDegreeLabel;
     185    private System.Windows.Forms.Label nodeDegreeLabelLabel;
     186    private System.Windows.Forms.Button navigateRightButton;
     187    private System.Windows.Forms.Button navigateLeftButton;
    60188  }
    61189}
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Tracking/SymbolicDataAnalysisGenealogyGraphView.cs

    r11852 r11864  
    7373      var visualNode = (VisualGenealogyGraphNode)sender;
    7474      var graphNode = (IGenealogyGraphNode<ISymbolicExpressionTree>)visualNode.Data;
     75
     76      nodeQualityLabel.Text = String.Format("{0:0.000}", graphNode.Quality);
     77      nodeRankLabel.Text = String.Format("{0:0.0}", graphNode.Rank);
     78      nodeDegreeLabel.Text = String.Format("{0} / {1}", graphNode.InDegree, graphNode.OutDegree);
    7579
    7680      if (openNew_CheckBox.Checked) {
     
    169173        var visualNode = SymbolicExpressionTreeChart.GetVisualSymbolicExpressionTreeNode(s);
    170174        visualNode.LineColor = myColor;
    171         //        visualNode.FillColor = myColor;
    172175
    173176        foreach (var c in s.Subtrees) {
     
    178181      SymbolicExpressionTreeChart.RepaintNodes();
    179182    }
     183
     184    private void navigateLeftButton_Click(object sender, EventArgs e) {
     185      var graphNode = (IGenealogyGraphNode<ISymbolicExpressionTree>)genealogyGraphChart.SelectedGraphNode;
     186      if (graphNode.Parents.Any()) {
     187        genealogyGraphChart.SelectedGraphNode = graphNode.Parents.First();
     188      }
     189    }
     190
     191    private void navigateRightButton_Click(object sender, EventArgs e) {
     192      var graphNode = (IGenealogyGraphNode<ISymbolicExpressionTree>)genealogyGraphChart.SelectedGraphNode;
     193      if (graphNode.Parents.Any()) {
     194        genealogyGraphChart.SelectedGraphNode = graphNode.Parents.Last(); // this will only work for genealogy graphs (not trace graphs)
     195      }
     196    }
    180197  }
    181198
Note: See TracChangeset for help on using the changeset viewer.