Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/15/11 13:34:38 (14 years ago)
Author:
mkommend
Message:

#1418: Finally added results from the grammar refactoring.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Tests/ArgumentDuplicaterTest.cs

    r5549 r5686  
    2121
    2222using System;
     23using System.Collections.Generic;
    2324using System.Linq;
    24 using System.Collections.Generic;
    2525using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    2626using HeuristicLab.Random;
     
    5656        ISymbolicExpressionTree tree = null;
    5757        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));
    6061        var success = ArgumentDuplicater.DuplicateArgument(random, tree, 3, 3);
    6162        Assert.IsTrue(success);
     
    7475      if (tree.Root.SubTrees.Count() != 2) return false;
    7576      var firstAdf = tree.Root.GetSubTree(1);
    76       return firstAdf.Grammar.GetAllowedSymbols(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;
    7778    }
    7879  }
Note: See TracChangeset for help on using the changeset viewer.