Class SuccinctIntUndirectedGraph.SuccinctGraphIterables

java.lang.Object
org.jgrapht.sux4j.SuccinctIntUndirectedGraph.SuccinctGraphIterables
All Implemented Interfaces:
Serializable, GraphIterables<Integer,Integer>
Enclosing class:
SuccinctIntUndirectedGraph

private static final class SuccinctIntUndirectedGraph.SuccinctGraphIterables extends Object implements GraphIterables<Integer,Integer>, Serializable
  • Field Details

  • Constructor Details

    • SuccinctGraphIterables

      private SuccinctGraphIterables()
    • SuccinctGraphIterables

      private SuccinctGraphIterables(SuccinctIntUndirectedGraph graph)
  • Method Details

    • getGraph

      public Graph<Integer,Integer> getGraph()
      Description copied from interface: GraphIterables
      Get the underlying graph.
      Specified by:
      getGraph in interface GraphIterables<Integer,Integer>
      Returns:
      the underlying graph
    • vertexCount

      public long vertexCount()
      Description copied from interface: GraphIterables
      Return the number of vertices in the graph.
      Specified by:
      vertexCount in interface GraphIterables<Integer,Integer>
      Returns:
      the number of vertices
    • edgeCount

      public long edgeCount()
      Description copied from interface: GraphIterables
      Return the number of edges in the graph.
      Specified by:
      edgeCount in interface GraphIterables<Integer,Integer>
      Returns:
      the number of edges.
    • edgesOf

      public Iterable<Integer> edgesOf(Integer source)
      Description copied from interface: GraphIterables
      Returns an iterable view over all edges touching the specified vertex. The returned iterators are live views. If the graph is modified while an iteration is in progress, the results of the iteration are undefined. If no edges are touching the specified vertex, the returned iterators are already exhausted.
      Specified by:
      edgesOf in interface GraphIterables<Integer,Integer>
      Parameters:
      source - input vertex
      Returns:
      an iterable view of the vertices contained in this graph
    • reverseSortedEdgesOfNoLoops

      private Iterable<Integer> reverseSortedEdgesOfNoLoops(int target)
    • incomingEdgesOf

      public Iterable<Integer> incomingEdgesOf(Integer vertex)
      Description copied from interface: GraphIterables
      Returns an iterable view over all edges incoming into the specified vertex. The returned iterators are live views. If the graph is modified while an iteration is in progress, the results of the iteration are undefined.

      In the case of undirected graphs the returned iterators return all edges touching the vertex, thus, some of the returned edges may have their source and target vertices in the opposite order.

      Specified by:
      incomingEdgesOf in interface GraphIterables<Integer,Integer>
      Parameters:
      vertex - input vertex
      Returns:
      an iterable view of all edges incoming into the specified vertex
    • outgoingEdgesOf

      public Iterable<Integer> outgoingEdgesOf(Integer vertex)
      Description copied from interface: GraphIterables
      Returns an iterable view over all edges outgoing into the specified vertex. The returned iterators are live views. If the graph is modified while an iteration is in progress, the results of the iteration are undefined.

      In the case of undirected graphs the returned iterators return all edges touching the vertex, thus, some of the returned edges may have their source and target vertices in the opposite order.

      Specified by:
      outgoingEdgesOf in interface GraphIterables<Integer,Integer>
      Parameters:
      vertex - input vertex
      Returns:
      an iterable view of all edges outgoing from the specified vertex