Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/17/11 14:07:47 (14 years ago)
Author:
mkommend
Message:

#1418: Corrected problem interfaces & unified naming of subtrees.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionTreeChart.cs

    r5549 r5733  
    263263
    264264      //draw terminal node
    265       if (node.SubTrees.Count() == 0) {
     265      if (node.Subtrees.Count() == 0) {
    266266        graphics.FillRectangle(nodeFillBrush, visualTreeNode.X, visualTreeNode.Y, visualTreeNode.Width, visualTreeNode.Height);
    267267        graphics.DrawRectangle(nodeLinePen, visualTreeNode.X, visualTreeNode.Y, visualTreeNode.Width, visualTreeNode.Height);
     
    281281      //calculate areas for the subtrees according to their tree size and call drawFunctionTree
    282282      Point connectFrom = new Point(visualTreeNode.X + visualTreeNode.Width / 2, visualTreeNode.Y + visualTreeNode.Height);
    283       int[] xBoundaries = new int[node.SubTrees.Count() + 1];
     283      int[] xBoundaries = new int[node.Subtrees.Count() + 1];
    284284      xBoundaries[0] = x;
    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,
     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,
    288288          xBoundaries[i + 1] - xBoundaries[i], height, connectFrom);
    289289      }
Note: See TracChangeset for help on using the changeset viewer.