- Timestamp:
- 02/21/14 14:25:14 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionTreeChart.cs
r10496 r10499 108 108 visualLines = new Dictionary<Tuple<ISymbolicExpressionTreeNode, ISymbolicExpressionTreeNode>, VisualSymbolicExpressionTreeNodeConnection>(); 109 109 if (tree != null) { 110 foreach (ISymbolicExpressionTreeNode node in tree.IterateNodesPrefix()) { 110 IEnumerable<ISymbolicExpressionTreeNode> nodes; 111 if (tree.Root.SubtreeCount == 1) nodes = tree.Root.GetSubtree(0).IterateNodesPrefix(); 112 else nodes = tree.Root.IterateNodesPrefix(); 113 foreach (ISymbolicExpressionTreeNode node in nodes) { 111 114 visualTreeNodes[node] = new VisualSymbolicExpressionTreeNode(node); 112 115 if (node.Parent != null) visualLines[Tuple.Create(node.Parent, node)] = new VisualSymbolicExpressionTreeNodeConnection(); … … 266 269 267 270 #region methods for painting the symbolic expression tree 268 private void DrawFunctionTree(ISymbolicExpressionTree symbolicExpressionTree, Graphics graphics, int preferredWidth, int preferredHeight, int minHDistance, int minVDistance) { 271 private void DrawFunctionTree(ISymbolicExpressionTree symbolicExpressionTree, Graphics graphics, int preferredWidth, int preferredHeight, int minHDistance, int minVDistance) { 269 272 var layoutNodes = layoutAdapter.Convert(symbolicExpressionTree).ToList(); 273 if(symbolicExpressionTree.Root.SubtreeCount==1) layoutNodes.RemoveAt(0); 270 274 layoutEngine.Reset(); 271 275 layoutEngine.Root = layoutNodes[0];
Note: See TracChangeset
for help on using the changeset viewer.