Class ShortestPathInfo<N extends DirectedGraphNode,E extends DirectedGraphEdge<? extends N,? extends N>>
- java.lang.Object
-
- org.processmining.models.graphbased.directed.analysis.ShortestPathInfo<N,E>
-
public class ShortestPathInfo<N extends DirectedGraphNode,E extends DirectedGraphEdge<? extends N,? extends N>> extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static int
NOPATH
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<N>
getShortestPath(N source, N target)
Returns the shortest path from the source to the target.int
getShortestPathLength(N source, N target)
-
-
-
Field Detail
-
NOPATH
public static final int NOPATH
- See Also:
- Constant Field Values
-
-
Method Detail
-
getShortestPath
public java.util.List<N> getShortestPath(N source, N target)
Returns the shortest path from the source to the target. If source.equals(target), then a list of length 1 is returned. Otherwise, the list returned contains the nodes from source to target that make up the path, including source as the first node and target as the last node. If no path exist, an empty list is returned.- Parameters:
source
-target
-- Returns:
-
-