Free cookie consent management tool by TermsFeed Policy Generator

Changeset 13641 for stable


Ignore:
Timestamp:
03/02/16 14:48:38 (8 years ago)
Author:
mkommend
Message:

#2570: Merged r13579 into stable.

Location:
stable
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding

  • stable/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeNode.cs

    r12702 r13641  
    106106      if (length > 0) return length;
    107107      else {
    108         length = 1;
     108        ushort l = 1;
    109109        if (subtrees != null) {
    110110          for (int i = 0; i < subtrees.Count; i++) {
    111             checked { length += (ushort)subtrees[i].GetLength(); }
     111            checked { l += (ushort)subtrees[i].GetLength(); }
    112112          }
    113113        }
     114        length = l;
    114115        return length;
    115116      }
     
    119120      if (depth > 0) return depth;
    120121      else {
     122        ushort d = 0;
    121123        if (subtrees != null) {
    122           for (int i = 0; i < subtrees.Count; i++) depth = Math.Max(depth, (ushort)subtrees[i].GetDepth());
    123         }
    124         depth++;
     124          for (int i = 0; i < subtrees.Count; i++) d = Math.Max(d, (ushort)subtrees[i].GetDepth());
     125        }
     126        d++;
     127        depth = d;
    125128        return depth;
    126129      }
Note: See TracChangeset for help on using the changeset viewer.