Changeset 5686 for branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Tests/SubroutineCreaterTest.cs
- Timestamp:
- 03/15/11 13:34:38 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Tests/SubroutineCreaterTest.cs
r5549 r5686 21 21 22 22 using System; 23 using System.Linq;24 23 using System.Collections.Generic; 25 24 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; … … 55 54 for (int i = 0; i < POPULATION_SIZE; i++) { 56 55 ISymbolicExpressionTree tree = null; 57 do { 58 tree = ProbabilisticTreeCreator.Create(random, grammar, MAX_TREE_LENGTH, MAX_TREE_DEPTH, 3, 3); 59 } while ( !OneMoreAdfAllowed(tree)); 56 tree = ProbabilisticTreeCreator.Create(random, grammar, MAX_TREE_LENGTH - 10, MAX_TREE_DEPTH); 60 57 var success = SubroutineCreater.CreateSubroutine(random, tree, MAX_TREE_LENGTH, MAX_TREE_DEPTH, 3, 3); 61 58 Assert.IsTrue(success); … … 70 67 ); 71 68 } 72 73 private bool OneMoreAdfAllowed(ISymbolicExpressionTree tree) {74 return tree.Length < 80 && tree.Root.SubTrees.Count() < 4;75 }76 69 } 77 70 }
Note: See TracChangeset
for help on using the changeset viewer.