V
- vertex typeE
- edge typepublic abstract class AbstractGraphPathSearch<V extends Vertex,E extends Edge<V>> extends Object implements GraphPathSearch<V,E>
Modifier and Type | Class and Description |
---|---|
protected class |
AbstractGraphPathSearch.DefaultResult
Default path search result that uses the DefaultPath to convey paths
in a graph.
|
GraphPathSearch.Result<V extends Vertex,E extends Edge<V>>
ALL_PATHS
Constructor and Description |
---|
AbstractGraphPathSearch() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkArguments(Graph<V,E> graph,
V src,
V dst)
Checks the specified path search arguments for validity.
|
protected abstract GraphPathSearch.Result<V,E> |
internalSearch(Graph<V,E> graph,
V src,
V dst,
EdgeWeigher<V,E> weigher,
int maxPaths) |
GraphPathSearch.Result<V,E> |
search(Graph<V,E> graph,
V src,
V dst,
EdgeWeigher<V,E> weigher,
int maxPaths)
Searches the specified graph for paths between vertices.
|
protected void checkArguments(Graph<V,E> graph, V src, V dst)
graph
- graph; must not be nullsrc
- source vertex; must not be null and belong to graphdst
- optional target vertex; must belong to graphpublic GraphPathSearch.Result<V,E> search(Graph<V,E> graph, V src, V dst, EdgeWeigher<V,E> weigher, int maxPaths)
GraphPathSearch
search
in interface GraphPathSearch<V extends Vertex,E extends Edge<V>>
graph
- graph to be searchedsrc
- optional source vertexdst
- optional destination vertex; if null paths to all vertex
destinations will be searchedweigher
- optional edge-weigher; if null, DefaultEdgeWeigher
will be used (assigns equal weights to all links)maxPaths
- limit on number of paths; GraphPathSearch.ALL_PATHS
if no limit