Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/08/11 10:42:57 (13 years ago)
Author:
mkommend
Message:

#1540: Added min and max arity to symbols and renamed SymbolicExpressionTreeNode.SubtreesCount to SymbolicExpressionTreeNode.SubtreeCount.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionTreeChart.cs

    r6377 r6387  
    262262
    263263      //draw terminal node
    264       if (node.SubtreesCount == 0) {
     264      if (node.SubtreeCount == 0) {
    265265        graphics.FillRectangle(nodeFillBrush, visualTreeNode.X, visualTreeNode.Y, visualTreeNode.Width, visualTreeNode.Height);
    266266        graphics.DrawRectangle(nodeLinePen, visualTreeNode.X, visualTreeNode.Y, visualTreeNode.Width, visualTreeNode.Height);
     
    280280      //calculate areas for the subtrees according to their tree size and call drawFunctionTree
    281281      Point connectFrom = new Point(visualTreeNode.X + visualTreeNode.Width / 2, visualTreeNode.Y + visualTreeNode.Height);
    282       int[] xBoundaries = new int[node.SubtreesCount + 1];
     282      int[] xBoundaries = new int[node.SubtreeCount + 1];
    283283      xBoundaries[0] = x;
    284       for (int i = 0; i < node.SubtreesCount; i++) {
     284      for (int i = 0; i < node.SubtreeCount; i++) {
    285285        xBoundaries[i + 1] = (int)(xBoundaries[i] + (width * (double)node.GetSubtree(i).GetLength()) / (node.GetLength() - 1));
    286286        DrawFunctionTree(node.GetSubtree(i), graphics, xBoundaries[i], y + height,
Note: See TracChangeset for help on using the changeset viewer.