Interface IndexedBidiGraph

All Superinterfaces:
IndexedDirectedGraph
All Known Subinterfaces:
AttributedIndexedBidiGraph<V,A>, IntAttributedIndexedBidiGraph, MutableIndexedBidiGraph
All Known Implementing Classes:
AbstractMutableIndexedBidiGraph, ChunkedMutableIndexedBidiGraph, ImmutableAttributed32BitIndexedBidiGraph, MutableIntAttributed16BitIndexedBidiGraph

public interface IndexedBidiGraph extends IndexedDirectedGraph
This interface provides read access to a directed graph G = (int, A) .

This interface provides access to the following data in addition to the data that interface DirectedGraph provides:

  • The previous count prevCount_i of the vertex v_i.
  • The k-th previous vertex of the vertex v_i, with k ∈ {0, ..., getPrevCount(i) - 1}.
Author:
Werner Randelshofer
  • Method Details

    • getPrevAsInt

      int getPrevAsInt(int v, int i)
      Returns the i-th previous vertex of v.
      Parameters:
      v - index of vertex v
      i - index of ingoing arrow
      Returns:
      the vertex index of the ingoing arrow
    • getPrevArrowAsInt

      int getPrevArrowAsInt(int v, int i)
      Returns the arrow data of the i-th ingoing arrow to v.
      Parameters:
      v - index of vertex v
      i - index of ingoing arrow
      Returns:
      the arrow data of the ingoing arrow
    • getPrevCount

      int getPrevCount(int v)
      Returns the number of direct predecessor vertices of v.
      Parameters:
      v - index of vertex v
      Returns:
      the number of next vertices of v.
    • prevVerticesEnumerator

      default @NonNull Enumerator.OfInt prevVerticesEnumerator(int v)
      Returns the direct successor vertices of the specified vertex.
      Parameters:
      v - index of vertex v
      Returns:
      a collection view on the direct successor vertices of vertex
    • findIndexOfPrevAsInt

      default int findIndexOfPrevAsInt(int v, int u)
      Returns the index of the arrow from v to u in the list of next-vertices from v.
      Parameters:
      v - vertex v
      u - vertex u
      Returns:
      index of vertex u in the list of next-vertices from v. Returns a value < 0 if u is not in the list.
    • isPrevAsInt

      default boolean isPrevAsInt(int v, int u)
      Returns whether there is an arrow from vertex u to vertex v.
      Parameters:
      v - a vertex
      u - a vertex
      Returns:
      true if there is an arrow from u to v