Changeset 5733 for branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views
- Timestamp:
- 03/17/11 14:07:47 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionTreeChart.cs
r5549 r5733 263 263 264 264 //draw terminal node 265 if (node.Sub Trees.Count() == 0) {265 if (node.Subtrees.Count() == 0) { 266 266 graphics.FillRectangle(nodeFillBrush, visualTreeNode.X, visualTreeNode.Y, visualTreeNode.Width, visualTreeNode.Height); 267 267 graphics.DrawRectangle(nodeLinePen, visualTreeNode.X, visualTreeNode.Y, visualTreeNode.Width, visualTreeNode.Height); … … 281 281 //calculate areas for the subtrees according to their tree size and call drawFunctionTree 282 282 Point connectFrom = new Point(visualTreeNode.X + visualTreeNode.Width / 2, visualTreeNode.Y + visualTreeNode.Height); 283 int[] xBoundaries = new int[node.Sub Trees.Count() + 1];283 int[] xBoundaries = new int[node.Subtrees.Count() + 1]; 284 284 xBoundaries[0] = x; 285 for (int i = 0; i < node.Sub Trees.Count(); i++) {286 xBoundaries[i + 1] = (int)(xBoundaries[i] + (width * (double)node.Sub Trees.ElementAt(i).GetLength()) / (node.GetLength() - 1));287 DrawFunctionTree(node.Sub Trees.ElementAt(i), graphics, xBoundaries[i], y + height,285 for (int i = 0; i < node.Subtrees.Count(); i++) { 286 xBoundaries[i + 1] = (int)(xBoundaries[i] + (width * (double)node.Subtrees.ElementAt(i).GetLength()) / (node.GetLength() - 1)); 287 DrawFunctionTree(node.Subtrees.ElementAt(i), graphics, xBoundaries[i], y + height, 288 288 xBoundaries[i + 1] - xBoundaries[i], height, connectFrom); 289 289 }
Note: See TracChangeset
for help on using the changeset viewer.