Changeset 5686 for branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Tests/ArgumentDuplicaterTest.cs
- Timestamp:
- 03/15/11 13:34:38 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Tests/ArgumentDuplicaterTest.cs
r5549 r5686 21 21 22 22 using System; 23 using System.Collections.Generic; 23 24 using System.Linq; 24 using System.Collections.Generic;25 25 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 26 26 using HeuristicLab.Random; … … 56 56 ISymbolicExpressionTree tree = null; 57 57 do { 58 tree = ProbabilisticTreeCreator.Create(random, grammar, MAX_TREE_LENGTH, MAX_TREE_DEPTH, 3, 3); 59 } while(!HasAdfWithArguments(tree)); 58 tree = ProbabilisticTreeCreator.Create(random, grammar, MAX_TREE_LENGTH, MAX_TREE_DEPTH); 59 SubroutineCreater.CreateSubroutine(random, tree, MAX_TREE_LENGTH, MAX_TREE_DEPTH, 3, 3); 60 } while (!HasAdfWithArguments(tree)); 60 61 var success = ArgumentDuplicater.DuplicateArgument(random, tree, 3, 3); 61 62 Assert.IsTrue(success); … … 74 75 if (tree.Root.SubTrees.Count() != 2) return false; 75 76 var firstAdf = tree.Root.GetSubTree(1); 76 return firstAdf.Grammar.GetAllowed Symbols(firstAdf.Symbol, 0).Where(x => x is Argument).Count() == 1;77 return firstAdf.Grammar.GetAllowedChildSymbols(firstAdf.Symbol, 0).Where(x => x is Argument).Count() == 1; 77 78 } 78 79 }
Note: See TracChangeset
for help on using the changeset viewer.