Changeset 15280 for branches/Async/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeNode.cs
- Timestamp:
- 07/23/17 00:52:14 (7 years ago)
- Location:
- branches/Async
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Async
- Property svn:mergeinfo changed
-
branches/Async/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding (added) merged: 13395,13397,13471,13579
- Property svn:mergeinfo changed
-
branches/Async/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeNode.cs
r12509 r15280 106 106 if (length > 0) return length; 107 107 else { 108 length= 1;108 ushort l = 1; 109 109 if (subtrees != null) { 110 110 for (int i = 0; i < subtrees.Count; i++) { 111 checked { l ength+= (ushort)subtrees[i].GetLength(); }111 checked { l += (ushort)subtrees[i].GetLength(); } 112 112 } 113 113 } 114 length = l; 114 115 return length; 115 116 } … … 119 120 if (depth > 0) return depth; 120 121 else { 122 ushort d = 0; 121 123 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; 125 128 return depth; 126 129 }
Note: See TracChangeset
for help on using the changeset viewer.