/// <summary> /// Determines whether the specified edge is contained in this graph. /// </summary> /// <param name="edge"> The edge to look for. </param> /// <returns> <c>true</c> if the specified edge is contained in the graph; otherwise, <c>false</c> . </returns> public bool ContainsEdge(Edge <T> edge) { return(graphEdges.Contains(edge)); }
/// <summary> /// Adds the edge to the graph. /// </summary> /// <param name="from"> The from vertex. </param> /// <param name="to"> The to vertex. </param> /// <param name="weight"> The weight of this edge. </param> public void AddEdge(Vertex <T> from, Vertex <T> to, double weight) { var edge = new Edge <T>(from, to, weight, graphIsDirected); AddEdge(edge); }