Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/28/14 14:18:24 (10 years ago)
Author:
bburlacu
Message:

#1772: Removed Storable property from Vertex in- and outArcs as it causes a stack overflow exception during serialization. Added a list of arcs to the DirectedGraph class which is persisted. The Vertex in- and outArcs lists are then restored by the graph after the deserialization. Renamed Nodes data member to Vertices.

Location:
branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/GenealogyGraph
Files:
3 edited

Legend:

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

    r10897 r10903  
    3737      set { ranks = value; }
    3838    }
    39     public new IEnumerable<IGenealogyGraphNode> Nodes {
    40       get { return from n in base.Nodes select (IGenealogyGraphNode)n; }
     39    public new IEnumerable<IGenealogyGraphNode> Vertices {
     40      get { return from n in base.Vertices select (IGenealogyGraphNode)n; }
    4141    }
    4242
     
    5858      source.AddForwardArc(arc);
    5959      target.AddReverseArc(arc);
     60      arcs.Add(arc);
    6061      return arc;
    6162    }
     
    9798      set { ranks = value; }
    9899    }
    99     public new IEnumerable<IGenealogyGraphNode<T>> Nodes {
    100       get { return from n in base.Nodes select (IGenealogyGraphNode<T>)n; }
     100    public new IEnumerable<IGenealogyGraphNode<T>> Vertices {
     101      get { return from n in base.Vertices select (IGenealogyGraphNode<T>)n; }
    101102    }
    102103    // contructors
     
    132133      source.AddForwardArc(arc);
    133134      target.AddReverseArc(arc);
     135      arcs.Add(arc);
    134136      return arc;
    135137    }
    136     IEnumerable<IGenealogyGraphNode> IGenealogyGraph.Nodes {
    137       get { return Nodes; }
     138    IEnumerable<IGenealogyGraphNode> IGenealogyGraph.Vertices {
     139      get { return Vertices; }
    138140    }
    139141    public event EventHandler GraphUpdated;
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/GenealogyGraph/GenealogyGraphArc.cs

    r10888 r10903  
    3131    protected GenealogyGraphArc(bool deserializing) : base(deserializing) { }
    3232    protected GenealogyGraphArc(GenealogyGraphArc original, Cloner cloner)
    33       : 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;
    39     }
     33      : base(original, cloner) { }
    4034
    4135    protected GenealogyGraphArc() { }
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/GenealogyGraph/Interfaces/IGenealogyGraph.cs

    r10888 r10903  
    2626  public interface IGenealogyGraph : IDirectedGraph {
    2727    Dictionary<double, List<IGenealogyGraphNode>> Ranks { get; }
    28     new IEnumerable<IGenealogyGraphNode> Nodes { get; }
     28    new IEnumerable<IGenealogyGraphNode> Vertices { get; }
    2929  }
    3030
    3131  public interface IGenealogyGraph<T> : IGenealogyGraph where T : class, IItem {
    32     new IEnumerable<IGenealogyGraphNode<T>> Nodes { get; }
     32    new IEnumerable<IGenealogyGraphNode<T>> Vertices { get; }
    3333  }
    3434}
Note: See TracChangeset for help on using the changeset viewer.