Changeset 10285 for branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/GenealogyGraph/GenealogyGraphNode.cs
- Timestamp:
- 01/05/14 20:47:50 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/GenealogyGraph/GenealogyGraphNode.cs
r10278 r10285 43 43 public new List<IGenealogyGraphArc> InArcs { 44 44 get { 45 return base.InArcs .Cast<IGenealogyGraphArc>().ToList();45 return base.InArcs == null ? null : base.InArcs.Cast<IGenealogyGraphArc>().ToList(); 46 46 } 47 47 } 48 48 public new List<IGenealogyGraphArc> OutArcs { 49 49 get { 50 return base.OutArcs .Cast<IGenealogyGraphArc>().ToList();50 return base.OutArcs == null ? null : base.OutArcs.Cast<IGenealogyGraphArc>().ToList(); 51 51 } 52 52 } … … 109 109 return Quality.CompareTo(other.Quality); 110 110 } 111 112 public new void AddForwardArc(IVertex target, double w = 0, object data = null) { 113 var e = new GenealogyGraphArc { Source = this, Target = (IGenealogyGraphNode)target, Data = data, Weight = w }; 114 base.AddForwardArc(e); 115 } 116 public new void AddReverseArc(IVertex source, double w = 0.0, object data = null) { 117 var e = new GenealogyGraphArc { Source = (IGenealogyGraphNode)source, Target = this, Data = data, Weight = w }; 118 base.AddReverseArc(e); 119 } 111 120 } 112 121 113 122 [StorableClass] 114 123 [Item("GenealogyGraphNode", "A genealogy graph node which also has a Content")] 115 public class GenealogyGraphNode<T> : GenealogyGraphNode, IGenealogyGraphNode<T> {124 public class GenealogyGraphNode<T> : GenealogyGraphNode, IGenealogyGraphNode<T> where T : class,IItem { 116 125 public T Content { get; set; } 126 117 127 } 118 128 }
Note: See TracChangeset
for help on using the changeset viewer.