public class DepthFirstSearch<V extends Vertex,E extends Edge<V>> extends AbstractGraphPathSearch<V,E>
Modifier and Type | Class and Description |
---|---|
static class |
DepthFirstSearch.EdgeType
Graph edge types as classified by the DFS algorithm.
|
class |
DepthFirstSearch.SpanningTreeResult
Graph search result which includes edge classification for building
a spanning tree.
|
AbstractGraphPathSearch.DefaultResult
GraphPathSearch.Result<V extends Vertex,E extends Edge<V>>
ALL_PATHS
Constructor and Description |
---|
DepthFirstSearch() |
Modifier and Type | Method and Description |
---|---|
protected DepthFirstSearch.SpanningTreeResult |
internalSearch(Graph<V,E> graph,
V src,
V dst,
EdgeWeigher<V,E> weigher,
int maxPaths) |
protected boolean |
isForwardEdge(AbstractGraphPathSearch.DefaultResult result,
E edge)
Determines whether the specified edge is a forward edge using the
accumulated set of parent edges for each vertex.
|
checkArguments, search
protected DepthFirstSearch.SpanningTreeResult internalSearch(Graph<V,E> graph, V src, V dst, EdgeWeigher<V,E> weigher, int maxPaths)
internalSearch
in class AbstractGraphPathSearch<V extends Vertex,E extends Edge<V>>
protected boolean isForwardEdge(AbstractGraphPathSearch.DefaultResult result, E edge)
result
- search resultedge
- edge to be classified