- Type Parameters:
V- the vertex data typeA- the arrow data type
- All Superinterfaces:
BareBidiGraph<V,,A> BareDirectedGraph<V,,A> BareDirectedVertexGraph<V>,DirectedGraph<V,A>
- All Known Subinterfaces:
MutableBidiGraph<V,A>
- All Known Implementing Classes:
ImmutableAttributed32BitIndexedBidiGraph,IndexedBidiGraphBidiGraphFacade,SimpleMutableBidiGraph
Adds convenience methods to the interface defined in
BareBidiGraph.- Author:
- Werner Randelshofer
-
Method Summary
Modifier and TypeMethodDescriptiondefault intfindIndexOfPrev(@NonNull V v, @NonNull V u) Returns the index of vertexuin the list of previous vertices ofvif an arrow fromutovexists.getPrevArc(@NonNull V v, int i) Returns the arc data for thei-th previous (incoming) arrow from vertexv.default @NonNull Collection<Arc<V, A>> getPrevArcs(@NonNull V v) Returns the list of previous arc data of vertexv.default @NonNull Collection<A> Returns the list of previous (incoming) arrows of vertexv.default @NonNull Collection<V> Returns the list of next vertices of vertexv.default booleanReturns whether there is an arrow from vertexuto vertexv.default @NonNull Enumerator<V> searchPrevVertices(@NonNull V start, boolean dfs) Searches for vertices starting at the provided vertex.default @NonNull Enumerator<V> Searches for vertices starting at the provided vertex.Methods inherited from interface org.jhotdraw8.graph.BareBidiGraph
getPrev, getPrevArrow, getPrevCountMethods inherited from interface org.jhotdraw8.graph.BareDirectedGraph
getNextArrowMethods inherited from interface org.jhotdraw8.graph.BareDirectedVertexGraph
getNext, getNextCount, getVerticesMethods inherited from interface org.jhotdraw8.graph.DirectedGraph
findArrow, findIndexOfNext, getArrowCount, getArrows, getArrows, getNextArc, getNextArcs, getNextArrows, getNextVertices, getVertex, getVertexCount, isNext, searchNextVertices, searchNextVertices
-
Method Details
-
getPrevArrows
Returns the list of previous (incoming) arrows of vertexv.- Parameters:
v- a vertex- Returns:
- a collection view on the previous arrows
-
getPrevVertices
Returns the list of next vertices of vertexv.- Parameters:
v- a vertex- Returns:
- a collection view on the direct successor vertices of vertex
-
getPrevArc
Returns the arc data for thei-th previous (incoming) arrow from vertexv.- Parameters:
v- a vertexi- the index into the list of outgoing arrows- Returns:
- the arc data
-
getPrevArcs
Returns the list of previous arc data of vertexv.- Parameters:
v- a vertex- Returns:
- a collection view on the arc data
-
findIndexOfPrev
Returns the index of vertexuin the list of previous vertices ofvif an arrow fromutovexists.- Parameters:
v- a vertexu- a vertex- Returns:
- index of vertex
uor a value < 0
-
isPrev
Returns whether there is an arrow from vertexuto vertexv.- Parameters:
v- a vertexu- a vertex- Returns:
- true if
uis previous ofv
-
searchPrevVertices
Searches for vertices starting at the provided vertex.- Parameters:
start- the start vertexdfs- whether to search depth-first instead of breadth-first- Returns:
- breadth first search
-
searchPrevVertices
default @NonNull Enumerator<V> searchPrevVertices(@NonNull V start, @NonNull AddToSet<V> visited, boolean dfs) Searches for vertices starting at the provided vertex.- Parameters:
start- the start vertexvisited- the add method of the visited set, seeSet.add(E).dfs- whether to search depth-first instead of breadth-first- Returns:
- breadth first search
-