public void AddOutGoing(BFGTDenseNode2 y) { Outgoing.Add(new KVP2(y.Level, y)); y.InDegree++; if (!Bound[0].ContainsKey(y.Index)) { Bound[0].Add(y.Index, 1); } if (!Count[0].ContainsKey(y.Index)) { Count[0].Add(y.Index, 0); } /* * 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 BFGTDenseNode2(BFGTDenseNode2 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 <KVP2>(); foreach (var kvp in node.Outgoing) { Outgoing.Add(new KVP2(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 KVP2(int key, BFGTDenseNode2 value) { Key = key; Value = value; }
public Edge2(BFGTDenseNode2 x, BFGTDenseNode2 y) { X = x; Y = y; }