Interface EdgeSet<V,​E>

  • Type Parameters:
    V - the vertices type
    E - the edges type
    All Superinterfaces:
    Collection<E>, Iterable<E>, Set<E>
    All Known Subinterfaces:
    IEdgeSet

    public interface EdgeSet<V,​E>
    extends Set<E>
    Set of graph edges.
     
     Graph<String, Integer> g = ...;
     String vertex = ...;
     for (EdgeIter<String, Integer> eit = g.outEdges(vertex).iterator(); eit.hasNext();) {
     	Integer e = eit.next();
     	String u = eit.source();
     	String v = eit.target();
     	assert vertex.equals(u);
     	System.out.println("Out edge of " + vertex + ": " + e + "(" + u + ", " + v + ")");
     }
     
    Author:
    Barak Ugav
    See Also:
    EdgeIter