Exemple #1
0
 public void AddEdge(Edge edge)
 {
     Edges.Add(edge);
 }
Exemple #2
0
        public void AddEdge(int vertexNumber, int from, int to, int weight)
        {
            Edge edge = new Edge(this.Vertices[from - 1], this.Vertices[to - 1], weight);

            Vertices[vertexNumber - 1].AddEdge(edge);
        }