protected class AbstractGraphPathSearch.DefaultResult extends Object implements GraphPathSearch.Result<V,E>
Modifier and Type | Field and Description |
---|---|
protected Map<V,Weight> |
costs |
protected int |
maxPaths |
protected Map<V,Set<E>> |
parents |
protected Set<Path<V,E>> |
paths |
Constructor and Description |
---|
DefaultResult(V src,
V dst)
Creates the result of a single-path search.
|
DefaultResult(V src,
V dst,
int maxPaths)
Creates the result of path search.
|
Modifier and Type | Method and Description |
---|---|
protected void |
buildPaths()
Builds a set of paths for the specified src/dst vertex pair.
|
Map<V,Weight> |
costs()
Return a bindings of each vertex to its cost in the path.
|
V |
dst()
Returns the search destination, if was was given.
|
Map<V,Set<E>> |
parents()
Returns bindings of each vertex to its parent edges in the path.
|
Set<Path<V,E>> |
paths()
Returns the set of paths produced as a result of the graph search.
|
V |
src()
Returns the search source.
|
public DefaultResult(V src, V dst)
src
- path sourcedst
- optional path destinationpublic DefaultResult(V src, V dst, int maxPaths)
src
- path sourcedst
- optional path destinationmaxPaths
- optional limit of number of paths;
GraphPathSearch.ALL_PATHS
if no limitpublic V src()
GraphPathSearch.Result
public V dst()
GraphPathSearch.Result
public Set<Path<V,E>> paths()
GraphPathSearch.Result
public Map<V,Weight> costs()
GraphPathSearch.Result
public Map<V,Set<E>> parents()
GraphPathSearch.Result
protected void buildPaths()