예제 #1
0
        public void AddEdge(int alpha, int beta, bool another = true)
        {
            if (Exists(alpha))
            {
                Nodes[alpha].AddNeighbour(beta);
            }
            else
            {
                Node node = this.AddVertex(alpha); //node is the created Alpha node
                node.AddNeighbour(beta);
            }

            if (!IsOriented && another)
            {
                AddEdge(beta, alpha, false);
            }
        }