Changeset 6409 for branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/GroupSymbol.cs
- Timestamp:
- 06/14/11 10:57:27 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/GroupSymbol.cs
r6387 r6409 27 27 28 28 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding { 29 [StorableClass] 29 30 public sealed class GroupSymbol : Symbol { 30 31 private const int minimumArity = 0; … … 45 46 public IEnumerable<ISymbol> Symbols { 46 47 get { return symbols; } 48 private set { symbols = new ObservableSet<ISymbol>(value); } 47 49 } 48 50 … … 75 77 } 76 78 77 public IEnumerable<ISymbol> Flatten() {78 return symbols.Union(symbols.OfType<GroupSymbol>().SelectMany(g => g.Flatten()));79 public override IEnumerable<ISymbol> Flatten() { 80 return base.Flatten().Union(symbols.SelectMany(s => s.Flatten())); 79 81 } 80 82 }
Note: See TracChangeset
for help on using the changeset viewer.