public void AddEdge(GraphVertex connectedVertex) { ConnectedEdges.Add(new GraphEdge(this, connectedVertex)); connectedVertex.ConnectedEdges.Add(new GraphEdge(connectedVertex, this)); }
public void AddEdge(GraphVertex firstVertex, GraphVertex secondVertex) { firstVertex.ConnectedEdges.Add(new GraphEdge(firstVertex, secondVertex)); secondVertex.ConnectedEdges.Add(new GraphEdge(secondVertex, firstVertex)); }
public GraphEdge(GraphVertex firstVertex, GraphVertex secondVertex) { FirstVertex = firstVertex; SecondVertex = secondVertex; }