Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/21/11 17:49:23 (14 years ago)
Author:
gkronber
Message:

#1418 Removed grammar specific members from ISymbolicExpressionTreeNode interface.

Location:
branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/ArgumentCreater.cs

    r5510 r5529  
    180180          subtree.Grammar.SetMinSubtreeCount(matchingSymbol, defunBranch.NumberOfArguments);
    181181          subtree.Grammar.SetMaxSubtreeCount(matchingSymbol, defunBranch.NumberOfArguments);
    182           foreach (var child in subtree.GetAllowedSymbols(0)) {
     182          foreach (var child in subtree.Grammar.GetAllowedSymbols(subtree.Symbol, 0)) {
    183183            for (int i = 0; i < subtree.Grammar.GetMaxSubtreeCount(matchingSymbol); i++) {
    184184              subtree.Grammar.SetAllowedChild(matchingSymbol, child, i);
  • branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/ArgumentDuplicater.cs

    r5510 r5529  
    124124          subtree.Grammar.SetMinSubtreeCount(matchingInvokeSymbol, selectedDefunBranch.NumberOfArguments);
    125125          subtree.Grammar.SetMaxSubtreeCount(matchingInvokeSymbol, selectedDefunBranch.NumberOfArguments);
    126           foreach (var child in subtree.GetAllowedSymbols(0)) {
     126          foreach (var child in subtree.Grammar.GetAllowedSymbols(subtree.Symbol, 0)) {
    127127            for (int i = 0; i < subtree.Grammar.GetMaxSubtreeCount(matchingInvokeSymbol); i++) {
    128128              subtree.Grammar.SetAllowedChild(matchingInvokeSymbol, child, i);
  • branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/SubroutineDeleter.cs

    r5510 r5529  
    9191        // deletion by random regeneration
    9292        ISymbolicExpressionTreeNode replacementTree = null;
    93         var allowedSymbolsList = invocationCutPoint.Parent.GetAllowedSymbols(invocationCutPoint.ReplacedChildIndex).ToList();
     93        var allowedSymbolsList = invocationCutPoint.Parent.Grammar.GetAllowedSymbols(invocationCutPoint.Parent.Symbol, invocationCutPoint.ReplacedChildIndex).ToList();
    9494        var weights = allowedSymbolsList.Select(s => s.InitialFrequency);
    9595        var selectedSymbol = allowedSymbolsList.SelectRandom(weights, random);
Note: See TracChangeset for help on using the changeset viewer.