Changeset 6760 for branches/PersistenceSpeedUp/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators
- Timestamp:
- 09/14/11 13:59:25 (13 years ago)
- Location:
- branches/PersistenceSpeedUp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PersistenceSpeedUp
- Property svn:ignore
-
old new 12 12 *.psess 13 13 *.vsp 14 *.docstates
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/PersistenceSpeedUp/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/SubroutineDuplicater.cs
r5809 r6760 83 83 subtree.Grammar.SetSubtreeCount(invokeSymbol, duplicatedDefunBranch.NumberOfArguments, duplicatedDefunBranch.NumberOfArguments); 84 84 85 foreach ( Symbol symbol in subtree.Grammar.Symbols) {85 foreach (ISymbol symbol in subtree.Grammar.Symbols) { 86 86 if (subtree.Grammar.IsAllowedChildSymbol(symbol, matchingInvokeSymbol)) 87 87 subtree.Grammar.AddAllowedChildSymbol(symbol, invokeSymbol); … … 93 93 } 94 94 95 foreach ( Symbol symbol in subtree.Grammar.GetAllowedChildSymbols(matchingInvokeSymbol))95 foreach (ISymbol symbol in subtree.Grammar.GetAllowedChildSymbols(matchingInvokeSymbol)) 96 96 if (symbol != invokeSymbol) //avoid duplicate entry invokesymbol / invokesymbol 97 97 subtree.Grammar.AddAllowedChildSymbol(invokeSymbol, symbol); 98 98 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))) 100 100 subtree.Grammar.AddAllowedChildSymbol(invokeSymbol, symbol, i); 101 101 }
Note: See TracChangeset
for help on using the changeset viewer.