Changeset 12346 for branches/SymbolicExpressionTreeEncoding
- Timestamp:
- 04/24/15 11:52:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SymbolicExpressionTreeEncoding/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/FullTreeCreator.cs
r12313 r12346 24 24 using HeuristicLab.Common; 25 25 using HeuristicLab.Core; 26 using HeuristicLab.Data;27 using HeuristicLab.Parameters;28 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 27 using HeuristicLab.PluginInfrastructure; … … 142 140 } 143 141 144 foreach (var subTree in root.Subtrees) 145 if (subTree.Grammar.GetMaximumSubtreeCount(subTree.Symbol) > 0) 146 RecursiveCreate(random, subTree, currentDepth + 1, maxDepth); 142 //additional levels should only be added if the maximum depth is not reached yet 143 if (maxDepth > currentDepth) { 144 foreach (var subTree in root.Subtrees) 145 if (subTree.Grammar.GetMaximumSubtreeCount(subTree.Symbol) > 0) 146 RecursiveCreate(random, subTree, currentDepth + 1, maxDepth); 147 } 147 148 } 148 149 }
Note: See TracChangeset
for help on using the changeset viewer.