コード例 #1
0
ファイル: Graph.cs プロジェクト: peshopbs2/it-career
        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);
            }
        }