source: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/LayoutEngines/ILayoutEngine.cs @ 10561

Last change on this file since 10561 was 10561, checked in by bburlacu, 5 years ago

#2076: Updated the way the layout is used in the SymbolicExpressionTreeChart; updated simplifier view accordingly.

File size: 953 bytes
Line 
1
2using System;
3using System.Collections.Generic;
4using System.Drawing;
5
6namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views {
7  interface ILayoutEngine<T> where T : class {
8    int NodeWidth { get; set; }
9    int NodeHeight { get; set; }
10    int HorizontalSpacing { get; set; }
11    int VerticalSpacing { get; set; }
12
13    void CalculateLayout();
14    void CalculateLayout(float width, float height);
15    void Initialize(T root, Func<T, IEnumerable<T>> getChildren, Func<T, int> getLength = null, Func<T, int> getDepth = null);
16    void Clear();
17    void Reset();
18
19    // function members necessary to navigate the tree structure
20    Func<T, IEnumerable<T>> GetChildren { get; set; }
21    Func<T, int> GetLength { get; set; }
22    Func<T, int> GetDepth { get; set; }
23
24    IEnumerable<T> GetContentNodes();
25    IEnumerable<VisualTreeNode<T>> GetVisualNodes();
26    Dictionary<T, PointF> GetCoordinates();
27  }
28}
Note: See TracBrowser for help on using the repository browser.