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).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/GenealogyGraph/GenealogyGraphArc.cs

    r10293 r10886  
    3232    protected GenealogyGraphArc(GenealogyGraphArc original, Cloner cloner)
    3333      : base(original, cloner) {
     34      this.Target = original.Target;
     35      this.Source = original.Source;
     36      this.Label = original.Label;
     37      this.Weight = original.Weight;
     38      this.Data = original.Data;
    3439    }
    3540
    36     public GenealogyGraphArc() { }
     41    protected GenealogyGraphArc() { }
     42
     43    public GenealogyGraphArc(IGenealogyGraphNode source, IGenealogyGraphNode target, object data = null) {
     44      Source = source;
     45      Target = target;
     46      Data = data;
     47    }
    3748
    3849    public override IDeepCloneable Clone(Cloner cloner) {
     
    6071      Data = (T)original.Data.Clone();
    6172    }
    62     public GenealogyGraphArc() { }
    6373
    6474    public override IDeepCloneable Clone(Cloner cloner) {
Note: See TracChangeset for help on using the changeset viewer.