Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/15/11 13:34:38 (13 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/SubroutineCreaterTest.cs

    r5549 r5686  
    2121
    2222using System;
    23 using System.Linq;
    2423using System.Collections.Generic;
    2524using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
     
    5554      for (int i = 0; i < POPULATION_SIZE; i++) {
    5655        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);
    6057        var success = SubroutineCreater.CreateSubroutine(random, tree, MAX_TREE_LENGTH, MAX_TREE_DEPTH, 3, 3);
    6158        Assert.IsTrue(success);
     
    7067        );
    7168    }
    72 
    73     private bool OneMoreAdfAllowed(ISymbolicExpressionTree tree) {
    74       return tree.Length < 80 && tree.Root.SubTrees.Count() < 4;
    75     }
    7669  }
    7770}
Note: See TracChangeset for help on using the changeset viewer.