Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking/3.4/SymbolicExpressionTreeGenealogyGraph.cs @ 7817

Last change on this file since 7817 was 7817, checked in by bburlacu, 12 years ago

#1772: Fixed a small bug in the TracingSymbolicExpressionTreeCrossover. Fixed bug in fragment matching code.

File size: 782 bytes
Line 
1using System.Collections.Generic;
2using System.Linq;
3using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
4using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
5
6namespace HeuristicLab.EvolutionaryTracking {
7  public class SymbolicExpressionTreeGenealogyGraph : GenealogyGraph<ISymbolicExpressionTree> {
8    public SymbolicExpressionTreeGenealogyGraph() {
9    }
10
11    [StorableConstructor]
12    public SymbolicExpressionTreeGenealogyGraph(bool serializing)
13      : base(serializing) {
14    }
15
16    #region Fragment tracing
17    public IEnumerable<ISymbolicExpressionTree> TraceFragment(ISymbolicExpressionTreeNode fragment, int mode = 0) {
18      return Keys.Where(tree => tree.ContainsFragment(fragment, mode));
19    }
20    #endregion
21  }
22}
Note: See TracBrowser for help on using the repository browser.