|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SingleSourceShortestPathAlg<NumType extends Comparable<NumType>>
Interface for single source shortest path algorithms.
Method Summary | |
---|---|
NodeMap |
getDistanceMap()
Return a NodeMap which contains the shortest distance to the source for every node (or infinity if the node is not reachable from the source). |
NumType |
getDistanceTo(Node t)
Return the shortest path distance to a given node (may only be called after the algorithm has been run). |
NodeMap<Edge> |
getPredecessorMap()
Return a NodeMap which maps every node in the graph to its predecessor (or null if no precedessor exists, e.g. for the source or because the node has not been reached by the shortest path algorithm). |
FixedPath |
getShortestPathTo(Node t)
Return the shortest path to a given node (may only be called after the algorithm has been run) |
void |
setSource(Node s)
Define the source of the shortest paths. |
Methods inherited from interface net.sourceforge.combean.interfaces.graph.alg.spath.ShortestPathAlg |
---|
getCalcLengthOnly, setAlgebra, setCalcLengthOnly, setEdgeWeightMap |
Methods inherited from interface net.sourceforge.combean.interfaces.graph.alg.GraphAlgorithm |
---|
getGraph, run, setGraph |
Method Detail |
---|
void setSource(Node s)
s
- FixedPath getShortestPathTo(Node t)
t
- the node to which the shortest path shall be given
NumType getDistanceTo(Node t)
t
- the node to which the shortest path distance shall be given.
NodeMap<Edge> getPredecessorMap()
NodeMap getDistanceMap()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |