V
- Class of the vertex of the graph.public class DirectedSearchIterator<V extends Vertex> extends BreadthSearchIterator<V>
parentOf
Constructor and Description |
---|
DirectedSearchIterator(AdjacencyListGraph<V,? extends Edge<V>> graph,
V root) |
DirectedSearchIterator(AdjacencyListGraph<V,? extends Edge<V>> graph,
V root,
boolean searchAll) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
isValidEdge(Edge<V> edge,
V currentVertex)
Abstract method to know if an edge is valid to explore in the breadth algorithm.
|
hasNext, isValidVertex, next, setSearchAll
getParent, isFound, remove
public DirectedSearchIterator(AdjacencyListGraph<V,? extends Edge<V>> graph, V root)
public DirectedSearchIterator(AdjacencyListGraph<V,? extends Edge<V>> graph, V root, boolean searchAll)
protected boolean isValidEdge(Edge<V> edge, V currentVertex)
BreadthSearchIterator
isValidEdge
in class BreadthSearchIterator<V extends Vertex>
edge
- Edge we want to check.currentVertex
- Vertex where the algorithm is exploring currently.