Free cookie consent management tool by TermsFeed Policy Generator

Changeset 10725


Ignore:
Timestamp:
04/05/14 00:40:35 (11 years ago)
Author:
bburlacu
Message:

#1772: The subtree index needs to be adjusted if it is greater than the fragment index and the fragment is different in size than the subtree it replaced.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/SymboldDataAnalysisGenealogyView.cs

    r10685 r10725  
    168168    }
    169169
    170     private void Trace(IGenealogyGraphNode<ISymbolicExpressionTree> graphNode, ISymbolicExpressionTreeNode subtree, FragmentGraph fragmentGraph, FragmentNode parentNode = null) {
     170    private static void Trace(IGenealogyGraphNode<ISymbolicExpressionTree> graphNode, ISymbolicExpressionTreeNode subtree, FragmentGraph fragmentGraph, FragmentNode parentNode = null) {
    171171      while (true) {
    172172        if (!graphNode.InArcs.Any()) return;
     
    228228          }
    229229        } else {
    230           // fragment and subtree are completely distinct => we only track the subtree
     230          // fragment and subtree are completely distinct => we only track the subtree (contained by the root parent)
     231          // if the subtree comes AFTER the fragment in the prefix iteration of nodes,
     232          // then its index is affected by the difference in fragment size between current tree and parent
    231233          graphNode = parentVertices[0];
    232234          tree = graphNode.Content;
     235          if (subtreeIndex > fragment.Index) {
     236            var diff = tree.NodeAt(fragment.Index).GetLength() - fragmentLength;
     237            subtreeIndex += diff;
     238          }
    233239          subtree = tree.NodeAt(subtreeIndex);
    234240          continue;
Note: See TracChangeset for help on using the changeset viewer.