Free cookie consent management tool by TermsFeed Policy Generator

Changeset 11476


Ignore:
Timestamp:
10/16/14 20:28:48 (10 years ago)
Author:
bburlacu
Message:

#1772: Small changes and improvements to TraceCalculator.cs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Tracking/TraceCalculator.cs

    r11473 r11476  
    3434      tc.Trace(node, subtreeIndex);
    3535      return tc.TraceGraph;
     36    }
     37
     38    public IGenealogyGraph<ISymbolicExpressionTree> Trace(IGenealogyGraphNode<ISymbolicExpressionTree> node, int subtreeIndex) {
     39      traceGraph.Clear();
     40      traceMap.Clear();
     41      Trace(node, subtreeIndex, null);
     42      return traceGraph;
    3643    }
    3744
     
    5663    /// <param name="si">The index of the traced subtree</param>
    5764    /// <param name="last">The last added node in the trace graph</param>
    58     public void Trace(IGenealogyGraphNode<ISymbolicExpressionTree> g, int si, IGenealogyGraphNode<ISymbolicExpressionTree> last = null) {
     65    private void Trace(IGenealogyGraphNode<ISymbolicExpressionTree> g, int si, IGenealogyGraphNode<ISymbolicExpressionTree> last = null) {
    5966      while (g.Parents.Any()) {
    6067        var parents = g.Parents.ToList();
     
    191198      if (arc != null)
    192199        return;
    193       arc = new GenealogyGraphArc(last, n);
    194       arc.Data = td;
     200      arc = new GenealogyGraphArc(last, n) { Data = td };
    195201      traceGraph.AddArc(arc);
    196202    }
Note: See TracChangeset for help on using the changeset viewer.