/// <summary> /// This method adds new edge to the graph /// </summary> /// <param name="from">from is the origin of new edge</param> /// <param name="to">to is the destination of new edge</param> /// <returns>it returns the newly create edge, in case its needed</returns> private NetEdge _AddNewGraphEdge(NetVertex from, NetVertex to) { string edgeString = string.Format("{0}-{1} Connected", from.ID.ToString(), to.ID.ToString()); NetEdge newEdge = new NetEdge(edgeString, from, to); Graph.AddEdge(newEdge); return(newEdge); }
/// <summary> /// This method adds new edge to the graph /// </summary> /// <param name="from">from is the origin of new edge</param> /// <param name="to">to is the destination of new edge</param> /// <returns>it returns the newly create edge, in case its needed</returns> private NetEdge _AddNewGraphEdge(NetVertex from, NetVertex to) { string edgeString = string.Format("{0}-{1} Connected", from.ID.ToString(), to.ID.ToString()); NetEdge newEdge = new NetEdge(edgeString, from, to); Graph.AddEdge(newEdge); return newEdge; }