Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/19/11 13:52:12 (13 years ago)
Author:
mkommend
Message:

#1532:

  • Enabled renaming of symbols
  • Fixed cloning of grammers
  • Added readonly attribute in grammars to lock grammars during the algorithm run
  • Removed useless clone method in cloner
  • Changed CheckedItemCollectionViews to enable scrolling during the locked state
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/SubroutineDuplicater.cs

    r5809 r6233  
    8383          subtree.Grammar.SetSubtreeCount(invokeSymbol, duplicatedDefunBranch.NumberOfArguments, duplicatedDefunBranch.NumberOfArguments);
    8484
    85           foreach (Symbol symbol in subtree.Grammar.Symbols) {
     85          foreach (ISymbol symbol in subtree.Grammar.Symbols) {
    8686            if (subtree.Grammar.IsAllowedChildSymbol(symbol, matchingInvokeSymbol))
    8787              subtree.Grammar.AddAllowedChildSymbol(symbol, invokeSymbol);
     
    9393          }
    9494
    95           foreach (Symbol symbol in subtree.Grammar.GetAllowedChildSymbols(matchingInvokeSymbol))
     95          foreach (ISymbol symbol in subtree.Grammar.GetAllowedChildSymbols(matchingInvokeSymbol))
    9696            if (symbol != invokeSymbol) //avoid duplicate entry invokesymbol / invokesymbol
    9797              subtree.Grammar.AddAllowedChildSymbol(invokeSymbol, symbol);
    9898          for (int i = 0; i < subtree.Grammar.GetMaximumSubtreeCount(matchingInvokeSymbol); i++) {
    99             foreach (Symbol symbol in subtree.Grammar.GetAllowedChildSymbols(matchingInvokeSymbol, i).Except(subtree.Grammar.GetAllowedChildSymbols(matchingInvokeSymbol)))
     99            foreach (ISymbol symbol in subtree.Grammar.GetAllowedChildSymbols(matchingInvokeSymbol, i).Except(subtree.Grammar.GetAllowedChildSymbols(matchingInvokeSymbol)))
    100100              subtree.Grammar.AddAllowedChildSymbol(invokeSymbol, symbol, i);
    101101          }
Note: See TracChangeset for help on using the changeset viewer.