示例#1
0
            public override void AddEdge(object node1, object node2)
            {
                //create a new index if not already there
                if (!AL.ContainsKey(node1))
                {
                    AL.Add(node1, new HashSet <object>());
                }
                if (!AL.ContainsKey(node2))
                {
                    AL.Add(node2, new HashSet <object>());
                }

                AL[node1].Add(node2);
                AL[node2].Add(node1);
            }