Module org.jhotdraw8.graph
Package org.jhotdraw8.graph
Interface AttributedIndexedDirectedGraph<V,A>
- Type Parameters:
V- the vertex data typeA- the arrow data type
- All Superinterfaces:
IndexedDirectedGraph
- All Known Subinterfaces:
AttributedIndexedBidiGraph<V,A>
- All Known Implementing Classes:
ImmutableAttributed16BitIndexedDirectedGraph,ImmutableAttributed32BitIndexedBidiGraph,ImmutableAttributed32BitIndexedDirectedGraph,SimpleMutableDirectedGraph
This interface provides read-only indexed access to a directed graph
G = (V, A) with
vertex and arrow attributes of the generic types V and A.
Gis a tuple(V, A).Vis the set of vertices with elementsv_i ∈ V. i ∈ {0, ..., vertexCount - 1}.Ais the set of ordered pairs with elements(v_i, v_j)_k ∈ A. i,j ∈ {0, ..., vertexCount - 1}. k ∈ {0, ..., arrowCount - 1}.
This interface provides access to the following data in addition to the interface IndexedDirectedGraph:
- The vertex
v_i ∈ V. - The arrow
a_k ∈ A. - The arrow
a_(i,j) ∈ A.
-
Method Summary
Modifier and TypeMethodDescriptiongetArrow(int index) Returns the data of the specified arrow.getNextArrow(int v, int index) Returns the specified successor (next) arrow of the specified vertex.default @NonNull Collection<Map.Entry<Integer, A>> getNextIntEntries(int vertexIndex) Returns the direct successor vertices of the specified vertex.getVertex(int index) Returns the data of the specified vertex.intgetVertexIndex(V vertex) Returns the index of the vertex.Methods inherited from interface org.jhotdraw8.graph.IndexedDirectedGraph
findIndexOfNextAsInt, getArrowCount, getNextArrowAsInt, getNextAsInt, getNextCount, getVertexCount, isNextAsInt, nextVerticesEnumerator
-
Method Details
-
getArrow
Returns the data of the specified arrow.- Parameters:
index- index of arrow- Returns:
- arrow data
-
getVertex
Returns the data of the specified vertex.- Parameters:
index- index of vertex- Returns:
- vertex data
-
getVertexIndex
Returns the index of the vertex.- Parameters:
vertex- a vertex- Returns:
- index of vertex
-
getNextArrow
Returns the specified successor (next) arrow of the specified vertex.- Parameters:
v- a vertexindex- index of next arrow- Returns:
- the specified arrow
-
getNextIntEntries
Returns the direct successor vertices of the specified vertex.- Parameters:
vertexIndex- a vertex- Returns:
- a collection view on the direct successor vertices of vertex with the arrow pointing to the vertex
-