Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/24/14 16:59:22 (10 years ago)
Author:
bburlacu
Message:

#1772: Added new SymbolicDataAnalysisGenealogyView and added support for the tracing of building blocks (finding the constituent ancestral elements of a selected subtree).

Location:
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views
Files:
4 added
8 edited

Legend:

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

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

    r10514 r10650  
    219219      <DependentUpon>SlidingWindowDataView.cs</DependentUpon>
    220220    </Compile>
     221    <Compile Include="SymboldDataAnalysisGenealogyView.cs">
     222      <SubType>UserControl</SubType>
     223    </Compile>
     224    <Compile Include="SymboldDataAnalysisGenealogyView.Designer.cs">
     225      <DependentUpon>SymboldDataAnalysisGenealogyView.cs</DependentUpon>
     226    </Compile>
     227    <Compile Include="SymbolicDataAnalysisExpressionGenealogyGraphChart.cs">
     228      <SubType>UserControl</SubType>
     229    </Compile>
     230    <Compile Include="SymbolicDataAnalysisExpressionGenealogyGraphChart.Designer.cs">
     231      <DependentUpon>SymbolicDataAnalysisExpressionGenealogyGraphChart.cs</DependentUpon>
     232    </Compile>
    221233    <Compile Include="SymbolicDataAnalysisExpressionLineageExplorerChart.cs">
    222234      <SubType>UserControl</SubType>
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.Designer.cs

    r9462 r10650  
    1919 */
    2020#endregion
     21
    2122
    2223namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views {
     
    137138      //
    138139      // btnOptimizeConstants
    139       //
    140       this.btnOptimizeConstants.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
     140      //      
     141      this.btnOptimizeConstants.AutoSize = true;
    141142      this.btnOptimizeConstants.Enabled = false;
    142       this.btnOptimizeConstants.Location = new System.Drawing.Point(104, 3);
     143      //      this.btnOptimizeConstants.Image = HeuristicLab.Common.Resources.VSImageLibrary.Performance;
     144      this.btnOptimizeConstants.ImageAlign = System.Drawing.ContentAlignment.MiddleCenter;
     145      this.btnOptimizeConstants.Location = new System.Drawing.Point(105, 3);
    143146      this.btnOptimizeConstants.Name = "btnOptimizeConstants";
    144       this.btnOptimizeConstants.Size = new System.Drawing.Size(97, 23);
     147      this.btnOptimizeConstants.Size = new System.Drawing.Size(80, 24);
    145148      this.btnOptimizeConstants.TabIndex = 2;
    146149      this.btnOptimizeConstants.Text = "Optimize";
     150      this.btnOptimizeConstants.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
     151      this.btnOptimizeConstants.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
    147152      this.btnOptimizeConstants.UseVisualStyleBackColor = true;
    148153      this.btnOptimizeConstants.Click += new System.EventHandler(this.btnOptimizeConstants_Click);
     
    150155      // btnSimplify
    151156      //
     157      this.btnSimplify.AutoSize = true;
     158      this.btnSimplify.Enabled = true;
     159      //      this.btnSimplify.Image = HeuristicLab.Common.Resources.VSImageLibrary.FormulaEvaluator;
     160      this.btnSimplify.ImageAlign = System.Drawing.ContentAlignment.MiddleCenter;
    152161      this.btnSimplify.Location = new System.Drawing.Point(3, 3);
    153162      this.btnSimplify.Name = "btnSimplify";
    154       this.btnSimplify.Size = new System.Drawing.Size(95, 23);
     163      this.btnSimplify.Size = new System.Drawing.Size(80, 24);
    155164      this.btnSimplify.TabIndex = 1;
    156165      this.btnSimplify.Text = "Simplify";
     166      this.btnSimplify.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
     167      this.btnSimplify.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
    157168      this.btnSimplify.UseVisualStyleBackColor = true;
    158169      this.btnSimplify.Click += new System.EventHandler(this.btnSimplify_Click);
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.cs

    r10524 r10650  
    5252      Content.ModelChanged += Content_Changed;
    5353      Content.ProblemDataChanged += Content_Changed;
     54      treeChart.Repainted += treeChart_Repainted;
    5455    }
    5556    protected override void DeregisterContentEvents() {
     
    5758      Content.ModelChanged -= Content_Changed;
    5859      Content.ProblemDataChanged -= Content_Changed;
     60      treeChart.Repainted -= treeChart_Repainted;
    5961    }
    6062
     
    6870      UpdateView();
    6971      viewHost.Content = this.Content;
     72    }
     73
     74    private void treeChart_Repainted(object sender, EventArgs e) {
     75      if (nodeImpacts != null && nodeImpacts.Count > 0)
     76        PaintNodeImpacts();
    7077    }
    7178
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicExpressionTreeChart.cs

    r10524 r10650  
    3232
    3333  internal sealed partial class InteractiveSymbolicExpressionTreeChart : SymbolicExpressionTreeChart {
    34     private ISymbolicExpressionTreeNode tempNode; // node in clipboard (to be cut/copy/pasted etc)
    35     private VisualTreeNode<ISymbolicExpressionTreeNode> currSelected; // currently selected node
     34    private ISymbolicExpressionTreeNode tempNode; //node in clipboard (to be cut/copy/pasted etc)
     35    private VisualTreeNode<ISymbolicExpressionTreeNode> currSelected; //currently selected node
    3636    private enum EditOp { NoOp, CopySubtree, CutSubtree }
    3737    private EditOp lastOp = EditOp.NoOp;
     
    218218            if (tempNode.IterateNodesBreadth().Contains(node))
    219219              throw new ArgumentException();// cannot cut/paste a node into itself
    220             ModifyTree(Tree, tempNode.Parent, tempNode, null); //remove node from its original parent     
     220            ModifyTree(Tree, tempNode.Parent, tempNode, null); //remove node from its original parent
    221221            ModifyTree(Tree, node, null, tempNode); //insert it as a child to the new parent
    222222            break;
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Plugin.cs.frame

    r10037 r10650  
    3232  [PluginDependency("HeuristicLab.Collections", "3.3")]
    3333  [PluginDependency("HeuristicLab.Common", "3.3")]
     34  [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
    3435  [PluginDependency("HeuristicLab.Core", "3.3")]
    3536  [PluginDependency("HeuristicLab.Core.Views", "3.3")]
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/SymbolicDataAnalysisExpressionLineageExplorerChart.cs

    r10517 r10650  
    11using System.Collections.Generic;
    22using System.Drawing;
     3using System.Windows.Forms;
    34using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views;
    45using HeuristicLab.Visualization;
     
    5960      }
    6061    }
     62
     63    protected override void pictureBox_MouseUp(object sender, MouseEventArgs e) {
     64      base.pictureBox_MouseUp(sender, e);
     65      // get the selected primitive and update it's graphics
     66      var point = new Point(e.X, e.Y);
     67
     68      var selectedPrimitives = Chart.GetAllPrimitives(point);
     69      // first primitive in the list should be the tile, the second one should be the actual primitive representing a tree node
     70      var tile = (SymbolicExpressionTreeTile)selectedPrimitives[0];
     71      var selectedPrimitive = (RectangularPrimitiveBase)selectedPrimitives[1];
     72      var tree = tile.SymbolicExpressionTree; // use the tree to get the genealogy graph node and the fragments used for tracing building blocks
     73
     74      var pen = new Pen(Color.Blue);
     75      using (var g = Graphics.FromImage(pictureBox.Image)) {
     76        g.DrawRectangle(pen, (float)selectedPrimitive.LowerLeft.X, (float)selectedPrimitive.LowerLeft.Y, (float)selectedPrimitive.Size.Width, (float)selectedPrimitive.Size.Height);
     77      }
     78    }
    6179  }
    6280}
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/SymbolicDataAnalysisExpressionLineageExplorerView.cs

    r10524 r10650  
    3030    public SymbolicDataAnalysisExpressionLineageExplorerView() {
    3131      InitializeComponent();
    32       symbolicExpressionTreeNodeLayoutEngine = new ReingoldTilfordLayoutEngine<ISymbolicExpressionTreeNode> {
     32      symbolicExpressionTreeNodeLayoutEngine = new ReingoldTilfordLayoutEngine<ISymbolicExpressionTreeNode>(node => node.Subtrees) {
    3333        HorizontalSpacing = MinHorizontalSpacing,
    3434        VerticalSpacing = MinVerticalSpacing,
     
    3636        NodeHeight = PreferredNodeHeight
    3737      };
     38
    3839      treeMap = new Dictionary<TreeNode, ISymbolicExpressionTree>();
    3940      double width = lineageExplorerChart.PreferredSize.Width;
     
    4344      }
    4445    }
    45 
    4646
    4747    #region events
Note: See TracChangeset for help on using the changeset viewer.