public ICollection <TE> getAllEdges(TV sourceVertex, TV targetVertex) { ICollection <TE> edges = null; if (containsVertex(sourceVertex) && containsVertex(targetVertex)) { edges = new List <TE> (); IEnumerator <TV> iter = delegator.outgoing <TV> (sourceVertex).GetEnumerator(); while (iter.MoveNext()) { if (iter.Current.Equals(targetVertex)) { TE e = (TE)delegator.Container.EdgeFactory.newInstance(sourceVertex, iter.Current); edges.Add(e); } } } return(edges); }
public bool containsEdge(TV sourceVertex, TV targetVertex) { return(delegator.outgoing <TV> (sourceVertex).Contains(targetVertex) || delegator.outgoing <TV> (targetVertex).Contains(sourceVertex)); //getEdge(sourceVertex, targetVertex) != null; }