Package com.jgalgo

Interface EdgeSet

  • All Superinterfaces:
    Collection<Integer>, it.unimi.dsi.fastutil.ints.IntCollection, it.unimi.dsi.fastutil.ints.IntIterable, it.unimi.dsi.fastutil.ints.IntSet, Iterable<Integer>, Set<Integer>

    public interface EdgeSet
    extends it.unimi.dsi.fastutil.ints.IntSet
    Set of graph edges.

    A set of integers, each represent an edge ID in a graph

     
     Graph g = ...;
     int vertex = ...;
     for (EdgeIter eit = g.outEdges(vertex).iterator(); eit.hasNext();) {
     	int e = eit.nextInt();
     	int u = eit.source();
     	int v = eit.target();
     	assert vertex == u;
     	System.out.println("Out edge of " + vertex + ": " + e + "(" + u + ", " + v + ")");
     }
     
    Author:
    Barak Ugav
    See Also:
    EdgeIter
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default EdgeIter intIterator()
      Return an edge iterator that iterate over the edges in this set
      EdgeIter iterator()
      Return an edge iterator that iterate over the edges in this set
      • Methods inherited from interface it.unimi.dsi.fastutil.ints.IntCollection

        add, addAll, contains, containsAll, intParallelStream, intSpliterator, intStream, parallelStream, removeAll, removeIf, removeIf, removeIf, retainAll, stream, toArray, toIntArray, toIntArray
      • Methods inherited from interface it.unimi.dsi.fastutil.ints.IntIterable

        forEach, forEach, forEach
      • Methods inherited from interface it.unimi.dsi.fastutil.ints.IntSet

        add, contains, rem, remove, remove, spliterator
    • Method Detail

      • iterator

        EdgeIter iterator()
        Return an edge iterator that iterate over the edges in this set
        Specified by:
        iterator in interface Collection<Integer>
        Specified by:
        iterator in interface it.unimi.dsi.fastutil.ints.IntCollection
        Specified by:
        iterator in interface it.unimi.dsi.fastutil.ints.IntIterable
        Specified by:
        iterator in interface it.unimi.dsi.fastutil.ints.IntSet
        Specified by:
        iterator in interface Iterable<Integer>
        Specified by:
        iterator in interface Set<Integer>
      • intIterator

        default EdgeIter intIterator()
        Return an edge iterator that iterate over the edges in this set
        Specified by:
        intIterator in interface it.unimi.dsi.fastutil.ints.IntCollection
        Specified by:
        intIterator in interface it.unimi.dsi.fastutil.ints.IntIterable