Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/05/14 20:47:50 (10 years ago)
Author:
bburlacu
Message:

#1772: Added SymbolicDataAnalysisGenealogyView, updated generic analyzer and operators.

File:
1 edited

Legend:

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

    r10278 r10285  
    4343    public new List<IGenealogyGraphArc> InArcs {
    4444      get {
    45         return base.InArcs.Cast<IGenealogyGraphArc>().ToList();
     45        return base.InArcs == null ? null : base.InArcs.Cast<IGenealogyGraphArc>().ToList();
    4646      }
    4747    }
    4848    public new List<IGenealogyGraphArc> OutArcs {
    4949      get {
    50         return base.OutArcs.Cast<IGenealogyGraphArc>().ToList();
     50        return base.OutArcs == null ? null : base.OutArcs.Cast<IGenealogyGraphArc>().ToList();
    5151      }
    5252    }
     
    109109      return Quality.CompareTo(other.Quality);
    110110    }
     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    }
    111120  }
    112121
    113122  [StorableClass]
    114123  [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 {
    116125    public T Content { get; set; }
     126
    117127  }
    118128}
Note: See TracChangeset for help on using the changeset viewer.