Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/22/14 13:49:35 (10 years ago)
Author:
bburlacu
Message:

#1772: Simplified GenealogyGraph (and related components) API in an effort to improve speed and memory consumption (eg., by sharing the same arc when walking the graph in both directions: parent-child and child-parent).

Location:
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolGraph/FPGraph.cs

    r10347 r10886  
    5656      return node;
    5757    }
    58 
    59     void AddArc(SymbolNode source, SymbolNode target, double weight, object data = null) {
    60       source.AddForwardArc(target, weight, data);
    61     }
    6258  }
    6359}
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolGraph/SymbolGraph.cs

    r10347 r10886  
    4949      return node;
    5050    }
    51 
    52     void AddArc(SymbolNode source, SymbolNode target, double weight, object data = null) {
    53       source.AddForwardArc(target, weight, data);
    54     }
    5551  }
    5652
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Tracking/SymbolicDataAnalysisExpressionTracing.cs

    r10884 r10886  
    5858          };
    5959          if (parent != null) {
    60             var arc = new GenealogyGraphArc { Source = parent, Target = fragmentNode };
     60            var arc = new GenealogyGraphArc(parent, fragmentNode);
    6161            parent.AddForwardArc(arc);
    62             fragmentNode.AddReverseArc(parent);
     62            fragmentNode.AddReverseArc(arc);
    6363          }
    6464          yield return fragmentNode; // no tracing if there are no parents
     
    9191          };
    9292          if (parent != null) {
    93             var arc = new GenealogyGraphArc { Source = parent, Target = fragmentNode };
     93            var arc = new GenealogyGraphArc(parent, fragmentNode);
    9494            parent.AddForwardArc(arc);
    95             fragmentNode.AddReverseArc(parent);
     95            fragmentNode.AddReverseArc(arc);
    9696          }
    9797          yield return fragmentNode;
     
    134134              };
    135135              if (parent != null) {
    136                 var arc = new GenealogyGraphArc { Source = parent, Target = fragmentNode };
     136                var arc = new GenealogyGraphArc(parent, fragmentNode);
    137137                parent.AddForwardArc(arc);
    138                 fragmentNode.AddReverseArc(parent);
     138                fragmentNode.AddReverseArc(arc);
    139139              }
    140140              //              fragmentNode.Content.Index1 = fragment.Index1 - index;
Note: See TracChangeset for help on using the changeset viewer.