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/Manipulators/ReplaceBranchManipulation.cs

    r5569 r5686  
    2020#endregion
    2121
    22 using System;
    23 using System.Collections.Generic;
    2422using System.Linq;
    2523using HeuristicLab.Common;
    2624using HeuristicLab.Core;
    2725using HeuristicLab.Data;
     26using HeuristicLab.Parameters;
    2827using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    29 using HeuristicLab.Parameters;
    3028
    3129namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
     
    7775                                let maxDepth = maxTreeDepth - symbolicExpressionTree.Depth + subtree.GetDepth()
    7876                                // find possible symbols for the node (also considering the existing branches below it)
    79                                 let allowedSymbols = (from symbol in parent.Grammar.GetAllowedSymbols(parent.Symbol, subtreeIndex)
     77                                let allowedSymbols = (from symbol in parent.Grammar.GetAllowedChildSymbols(parent.Symbol, subtreeIndex)
    8078                                                      // do not replace symbol with the same symbol
    8179                                                      where symbol.Name != subtree.Symbol.Name
    82                                                       where parent.Grammar.GetMinExpressionDepth(symbol) <= maxDepth
    83                                                       where parent.Grammar.GetMinExpressionLength(symbol) <= maxLength
     80                                                      where parent.Grammar.GetMinimumExpressionDepth(symbol) <= maxDepth
     81                                                      where parent.Grammar.GetMinimumExpressionLength(symbol) <= maxLength
    8482                                                      select symbol)
    8583                                                      .ToList()
     
    107105      selectedManipulationPoint.Parent.RemoveSubTree(selectedManipulationPoint.Index);
    108106      selectedManipulationPoint.Parent.InsertSubTree(selectedManipulationPoint.Index, seedNode);
    109       seedNode = ProbabilisticTreeCreator.PTC2(random, seedNode, selectedManipulationPoint.MaxLength, selectedManipulationPoint.MaxDepth, 0, 0);
     107      ProbabilisticTreeCreator.PTC2(random, seedNode, selectedManipulationPoint.MaxLength, selectedManipulationPoint.MaxDepth);
    110108    }
    111109  }
Note: See TracChangeset for help on using the changeset viewer.