Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/08/14 13:58:54 (11 years ago)
Author:
bburlacu
Message:

#1772: - Added a ViewHost in the right side of the GenealogyGraphView which displays the encoding-specific content when a GenealogyGraphNode is clicked.

  • Migrated new SymbolicExpressionTreeChart (drawing the tree using the ReingoldTilfordLayoutEngine) to the new branch
  • Copied SymbolicDataAnalysisExpressionTreeMatching.cs and SymbolicDataAnalysisExpressionTreeSimilarityCalculator.cs to the new branch
Location:
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Formatters/SymbolicExpressionTreeLatexFormatter.cs

    r10269 r10302  
    11using System.Collections.Generic;
     2using System.Linq;
    23using System.Text;
    34using HeuristicLab.Common;
     
    1213      {"StartSymbol","RPB"}
    1314    };
    14     private ReingoldTilfordLayoutEngine layoutEngine;
     15    private readonly ReingoldTilfordLayoutEngine<ISymbolicExpressionTreeNode> layoutEngine;
     16    private readonly SymbolicExpressionTreeLayoutAdapter layoutAdapter;
     17
    1518
    1619    public SymbolicExpressionTreeLatexFormatter() {
    17       layoutEngine = new ReingoldTilfordLayoutEngine();
     20      layoutEngine = new ReingoldTilfordLayoutEngine<ISymbolicExpressionTreeNode>();
    1821    }
    1922
    2023    protected SymbolicExpressionTreeLatexFormatter(SymbolicExpressionTreeLatexFormatter original, Cloner cloner)
    2124      : base(original, cloner) {
    22       layoutEngine = new ReingoldTilfordLayoutEngine();
     25      layoutEngine = new ReingoldTilfordLayoutEngine<ISymbolicExpressionTreeNode>();
     26      layoutAdapter = new SymbolicExpressionTreeLayoutAdapter();
    2327    }
    2428
     
    2832
    2933    public string Format(ISymbolicExpressionTree symbolicExpressionTree) {
    30       layoutEngine.SymbolicExpressionTree = symbolicExpressionTree;
     34      var layoutNodes = layoutAdapter.Convert(symbolicExpressionTree).ToList();
     35      layoutEngine.Reset();
     36      layoutEngine.Root = layoutNodes[0];
     37      foreach (var ln in layoutNodes)
     38        layoutEngine.AddNode(ln.Content, ln);
    3139      var nodeCoordinates = layoutEngine.GetNodeCoordinates();
    3240      var sb = new StringBuilder();
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.csproj

    r10269 r10302  
    186186    <Compile Include="Creators\RampedHalfAndHalfTreeCreator.cs" />
    187187    <Compile Include="Formatters\SymbolicExpressionTreeGraphvizFormatter.cs" />
     188    <Compile Include="Formatters\SymbolicExpressionTreeLatexFormatter.cs" />
    188189    <Compile Include="Interfaces\IFragment.cs" />
    189190    <Compile Include="Interfaces\ILayoutAdapter.cs" />
Note: See TracChangeset for help on using the changeset viewer.