Changeset 12515 for branches/HiveStatistics/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Grammars
- Timestamp:
- 06/25/15 18:21:19 (9 years ago)
- Location:
- branches/HiveStatistics/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding (added) merged: 12480,12509
- Property svn:mergeinfo changed
-
branches/HiveStatistics/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Grammars/SymbolicExpressionGrammarBase.cs
r12422 r12515 338 338 List<string> temp; 339 339 if (allowedChildSymbols.TryGetValue(parent.Name, out temp)) { 340 if (temp.SelectMany(s => GetSymbol(s).Flatten()).Any(s => s.Name == child.Name)) { 341 cachedIsAllowedChildSymbol.Add(key, true); 342 return true; 340 for (int i = 0; i < temp.Count; i++) { 341 var symbol = GetSymbol(temp[i]); 342 foreach (var s in symbol.Flatten()) 343 if (s.Name == child.Name) { 344 cachedIsAllowedChildSymbol.Add(key, true); 345 return true; 346 } 343 347 } 344 348 } … … 365 369 List<string> temp; 366 370 if (allowedChildSymbolsPerIndex.TryGetValue(Tuple.Create(parent.Name, argumentIndex), out temp)) { 367 if (temp.SelectMany(s => GetSymbol(s).Flatten()).Any(s => s.Name == child.Name)) { 368 cachedIsAllowedChildSymbolIndex.Add(key, true); 369 return true; 371 for (int i = 0; i < temp.Count; i++) { 372 var symbol = GetSymbol(temp[i]); 373 foreach (var s in symbol.Flatten()) 374 if (s.Name == child.Name) { 375 cachedIsAllowedChildSymbolIndex.Add(key, true); 376 return true; 377 } 370 378 } 371 379 }
Note: See TracChangeset
for help on using the changeset viewer.