Package com.jgalgo.alg
Interface ShortestPathAllPairs.IResult
-
- All Superinterfaces:
ShortestPathAllPairs.Result<Integer,Integer>
- Enclosing interface:
- ShortestPathAllPairs
public static interface ShortestPathAllPairs.IResult extends ShortestPathAllPairs.Result<Integer,Integer>
A result object for anShortestPathAllPairs
algorithm forIntGraph
.- Author:
- Barak Ugav
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description double
distance(int source, int target)
Get the distance of the shortest path between two vertices.default double
distance(Integer source, Integer target)
Deprecated.IPath
getNegativeCycle()
Get the negative cycle that was found.IPath
getPath(int source, int target)
Get the shortest path between vertices.default IPath
getPath(Integer source, Integer target)
Deprecated.-
Methods inherited from interface com.jgalgo.alg.ShortestPathAllPairs.Result
foundNegativeCycle
-
-
-
-
Method Detail
-
distance
double distance(int source, int target)
Get the distance of the shortest path between two vertices.- Parameters:
source
- the source vertextarget
- the target vertex- Returns:
- the sum of weights of edges in the shortest path from the source to target,
or
Double.POSITIVE_INFINITY
if no such path exists - Throws:
IllegalArgumentException
- if a negative cycle found. SeeShortestPathAllPairs.Result.foundNegativeCycle()
-
distance
@Deprecated default double distance(Integer source, Integer target)
Deprecated.Description copied from interface:ShortestPathAllPairs.Result
Get the distance of the shortest path between two vertices.- Specified by:
distance
in interfaceShortestPathAllPairs.Result<Integer,Integer>
- Parameters:
source
- the source vertextarget
- the target vertex- Returns:
- the sum of weights of edges in the shortest path from the source to target,
or
Double.POSITIVE_INFINITY
if no such path exists
-
getPath
IPath getPath(int source, int target)
Get the shortest path between vertices.- Parameters:
source
- the source vertextarget
- the target vertex- Returns:
- the shortest path from the source to target, or
null
if no such path exists - Throws:
IllegalArgumentException
- if a negative cycle found. SeeShortestPathAllPairs.Result.foundNegativeCycle()
-
getPath
@Deprecated default IPath getPath(Integer source, Integer target)
Deprecated.Description copied from interface:ShortestPathAllPairs.Result
Get the shortest path between vertices.- Specified by:
getPath
in interfaceShortestPathAllPairs.Result<Integer,Integer>
- Parameters:
source
- the source vertextarget
- the target vertex- Returns:
- the shortest path from the source to target, or
null
if no such path exists
-
getNegativeCycle
IPath getNegativeCycle()
Description copied from interface:ShortestPathAllPairs.Result
Get the negative cycle that was found.- Specified by:
getNegativeCycle
in interfaceShortestPathAllPairs.Result<Integer,Integer>
- Returns:
- the negative cycle that was found.
-
-