protected class AbstractGraphPathSearch.DefaultResult extends java.lang.Object implements GraphPathSearch.Result<V,E>
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<V,Weight> |
costs |
protected int |
maxPaths |
protected java.util.Map<V,java.util.Set<E>> |
parents |
protected java.util.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.
|
java.util.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.
|
java.util.Map<V,java.util.Set<E>> |
parents()
Returns bindings of each vertex to its parent edges in the path.
|
java.util.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 java.util.Set<Path<V,E>> paths()
GraphPathSearch.Result
public java.util.Map<V,Weight> costs()
GraphPathSearch.Result
public java.util.Map<V,java.util.Set<E>> parents()
GraphPathSearch.Result
protected void buildPaths()