Free cookie consent management tool by TermsFeed Policy Generator

Changeset 6817 for trunk


Ignore:
Timestamp:
09/22/11 12:33:04 (13 years ago)
Author:
mkommend
Message:

#1479: Corrected ReplaceBranchManipulation to create valid subtrees.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/ReplaceBranchManipulation.cs

    r5925 r6817  
    7979                                                      where symbol.Name != subtree.Symbol.Name
    8080                                                      where symbol.InitialFrequency > 0
    81                                                       where parent.Grammar.GetMinimumExpressionDepth(symbol) <= maxDepth
     81                                                      where parent.Grammar.GetMinimumExpressionDepth(symbol) + 1 <= maxDepth
    8282                                                      where parent.Grammar.GetMinimumExpressionLength(symbol) <= maxLength
    8383                                                      select symbol)
Note: See TracChangeset for help on using the changeset viewer.