public void AddOutGoing(BFGTDenseNode y) { Outgoing.Add(new KVP(y.Level, y)); y.InDegree++; if (!Bound.ContainsKey(0)) { Bound.Add(0, new Dictionary <int, int>()); Bound[0].Add(y.Index, 1); } if (!Count.ContainsKey(0)) { Count.Add(0, new Dictionary <int, int>()); Count[0].Add(y.Index, 0); } }
public BFGTDenseNode(BFGTDenseNode node) { Level = node.Level; InDegree = node.InDegree; Index = node.Index; KOut = new Dictionary <int, int>(); foreach (var i in node.KOut) { KOut.Add(i.Key, i.Value); } Outgoing = new IntervalHeap <KVP>(); foreach (var kvp in node.Outgoing) { Outgoing.Add(new KVP(kvp.Key, kvp.Value)); } Bound = new Dictionary <int, Dictionary <int, int> >(); foreach (var i in node.Bound) { Bound.Add(i.Key, new Dictionary <int, int>()); foreach (var i1 in i.Value) { Bound[i.Key].Add(i1.Key, i1.Value); } } Count = new Dictionary <int, Dictionary <int, int> >(); foreach (var i in node.Count) { Count.Add(i.Key, new Dictionary <int, int>()); foreach (var i1 in i.Value) { Count[i.Key].Add(i1.Key, i1.Value); } } }
public KVP(int key, BFGTDenseNode value) { Key = key; Value = value; }
public Edge(BFGTDenseNode x, BFGTDenseNode y) { X = x; Y = y; }