예제 #1
0
        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);
            }
        }
예제 #2
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);
                }
            }
        }
예제 #3
0
 public KVP(int key, BFGTDenseNode value)
 {
     Key   = key;
     Value = value;
 }
예제 #4
0
 public Edge(BFGTDenseNode x, BFGTDenseNode y)
 {
     X = x;
     Y = y;
 }