Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/28/14 16:23:40 (10 years ago)
Author:
bburlacu
Message:

#1772: Improved usage of GenealogyGraph and GenealogyGraphNode classes. Made some progress on building block tracing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionTreeTile.cs

    r10655 r10677  
    5858    }
    5959    public ReingoldTilfordLayoutEngine<ISymbolicExpressionTreeNode> LayoutEngine { get; set; }
    60     private Dictionary<IPrimitive, ISymbolicExpressionTreeNode> primitiveMap;
     60    private readonly Dictionary<IPrimitive, ISymbolicExpressionTreeNode> primitiveMap;
    6161
    6262    public SymbolicExpressionTreeTile(IChart chart)
    6363      : base(chart) {
    6464      primitiveMap = new Dictionary<IPrimitive, ISymbolicExpressionTreeNode>();
     65
     66      Group = new Group(chart);
    6567    }
    6668    public SymbolicExpressionTreeTile(IChart chart, ISymbolicExpressionTree tree)
    6769      : this(chart) {
    68       SymbolicExpressionTree = tree;
    6970      PreferredNodeWidth = 80;
    7071      PreferredNodeHeight = 40;
     72      SymbolicExpressionTree = tree;
    7173    }
    7274    private void GeneratePrimitives(double preferredNodeWidth, double preferredNodeHeight) {
    7375      Clear();
    74       ISymbolicExpressionTreeNode root = Root;
    75       if (root.Symbol is ProgramRootSymbol && root.SubtreeCount == 1) { root = root.GetSubtree(0); }
    76       var visualNodes = LayoutEngine.CalculateLayout(root);
     76      var actualRoot = Root;
     77      if (Root.Symbol is ProgramRootSymbol && Root.SubtreeCount == 1) { actualRoot = Root.GetSubtree(0); }
     78      var visualNodes = LayoutEngine.CalculateLayout(actualRoot);
    7779
    7880      var font = new Font(FontFamily.GenericSansSerif, 10, GraphicsUnit.Pixel);
Note: See TracChangeset for help on using the changeset viewer.