Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/10/10 11:26:26 (14 years ago)
Author:
gkronber
Message:

Added test classes for crossover and subroutine creater. #290 (Implement ADFs)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Crossovers/SubtreeCrossover.cs

    r3294 r3297  
    7474                            select branch;
    7575
    76       if (allowedBranches.Count() > 0) {
     76      if (allowedBranches.Count() == 0) {
     77        success = false;
     78        return parent0;
     79      } else {
    7780        var selectedBranch = SelectRandomBranch(random, allowedBranches, internalCrossoverPointProbability);
    7881
     
    8487        return parent0;
    8588      }
    86 
    87       success = false;
    88       return parent0;
    8989    }
    9090
Note: See TracChangeset for help on using the changeset viewer.