/// <summary> /// Returns whether Edge e is Directed or not /// </summary> /// <param name="e"></param> /// <returns></returns> public bool IsDirected(Edge e) { if (e == null) { return(false); } string other = e.GetVertexA().GetConnections().Find(id => id == e.GetVertexB().GetId()); Edge conj = e.Conjugate(); return(other == conj.GetVertexB().GetId()); }
/// <summary> /// Removes a bi-directional edge from the network /// </summary> /// <param name="e"></param> /// <returns></returns> public bool RemoveEdgeUndirected(Edge e) { return(_edges.Remove(e) && _edges.Remove(e.Conjugate())); }