Changeset 13875 for branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding
- Timestamp:
- 06/06/16 19:31:14 (9 years ago)
- Location:
- branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding merged: 13579
- Property svn:mergeinfo changed
-
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeNode.cs
r12891 r13875 110 110 if (length > 0) return length; 111 111 else { 112 length= 1;112 ushort l = 1; 113 113 if (subtrees != null) { 114 114 for (int i = 0; i < subtrees.Count; i++) { 115 checked { l ength+= (ushort)subtrees[i].GetLength(); }115 checked { l += (ushort)subtrees[i].GetLength(); } 116 116 } 117 117 } 118 length = l; 118 119 return length; 119 120 } … … 123 124 if (depth > 0) return depth; 124 125 else { 126 ushort d = 0; 125 127 if (subtrees != null) { 126 for (int i = 0; i < subtrees.Count; i++) depth = Math.Max(depth, (ushort)subtrees[i].GetDepth()); 127 } 128 depth++; 128 for (int i = 0; i < subtrees.Count; i++) d = Math.Max(d, (ushort)subtrees[i].GetDepth()); 129 } 130 d++; 131 depth = d; 129 132 return depth; 130 133 }
Note: See TracChangeset
for help on using the changeset viewer.