Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Tracking/SymbolicDataAnalysisExpressionBeforeManipulatorOperator.cs @ 10755

Last change on this file since 10755 was 10755, checked in by bburlacu, 10 years ago

#1772: Simplified genealogy graph and fragment graph creation:

  • the genealogy graph now has a 1-1 mapping between content and vertices (as opposed to 1-n as it was previously, to account for elites); this required changes to the directed graph implementation
  • the fragment graph only contains bifurcation points (where the subtree contains the fragment so tracing must be done both ways (in the root parent AND in the other parent). in the other cases, tracing is restarted from the parent genealogy graph node.
File size: 686 bytes
Line 
1using System.Linq;
2using HeuristicLab.Core;
3using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
4using HeuristicLab.EvolutionTracking;
5
6namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
7  public class SymbolicDataAnalysisExpressionBeforeManipulatorOperator : BeforeManipulatorOperator<ISymbolicExpressionTree> {
8    public override IOperation Apply() {
9      var result = base.Apply(); // add the vertex in the genealogy graph
10
11      var vChild = (IGenealogyGraphNode<ISymbolicExpressionTree>)GenealogyGraph[ChildParameter.ActualValue];
12      vChild.InArcs.First().Data = vChild.Content.IterateNodesPrefix().ToList();
13
14      return result;
15    }
16  }
17}
Note: See TracBrowser for help on using the repository browser.