public void AddPair(Vertex <T> first, Vertex <T> second, int weight) { var we = new WeightedEdge <T>(first, second, weight); first.AddEdge(we); second.AddEdge(we); AddToList(first); AddToList(second); AddNeighbors(first, second); }
public void AddEdge(WeightedEdge <T> edge) { WeightedEdges.Add(edge); }