Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/08/09 11:04:49 (15 years ago)
Author:
gkronber
Message:

Adapted GP crossover operators to match the new design for crossover operators. #512 (GP crossover operators should be changed to match the new design of crossover operators (see #475)).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.GP/Recombination/SizeFairCrossOver.cs

    r1212 r1286  
    4747    }
    4848
    49     internal override IFunctionTree Cross(TreeGardener gardener, MersenneTwister random, IFunctionTree tree0, IFunctionTree tree1, int maxTreeSize, int maxTreeHeight) {
     49    internal override IFunctionTree Cross(TreeGardener gardener, IRandom random, IFunctionTree tree0, IFunctionTree tree1, int maxTreeSize, int maxTreeHeight) {
    5050      int tries = 0;
    5151      IFunctionTree insertedBranch = null;
     
    5656        while (parent == null) parent = gardener.GetRandomParentNode(tree0);
    5757        removedBranchIndex = random.Next(parent.SubTrees.Count);
    58         insertedBranch = GetReplacementBranch(random, gardener, tree0, parent, removedBranchIndex, tree1, maxTreeSize, maxTreeHeight);
     58        insertedBranch = GetReplacementBranch((MersenneTwister)random, gardener, tree0, parent, removedBranchIndex, tree1, maxTreeSize, maxTreeHeight);
    5959      } while (insertedBranch == null && tries++ < MaxRecombinationTries);
    6060
Note: See TracChangeset for help on using the changeset viewer.