Package ons.util
Class AllPaths
java.lang.Object
ons.util.AllPaths
public class AllPaths
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description AllPaths(WeightedGraph g, double diameter)
-
Method Summary
Modifier and Type Method Description static AllPaths
getAllPathsObject(WeightedGraph g, double diameter)
Creates a new KSPOffline object, in case it does'n exist yet.java.util.ArrayList<java.lang.Integer>
getKShortestPath(int source, int destination, int k)
Retrieves the K-Path of the all Paths without node repetition from the source and destination.java.util.ArrayList<java.lang.Integer>[]
getPaths(int source, int destination)
Retrieves the all Paths without node repetition from the source and destination.
-
Constructor Details
-
Method Details
-
getAllPathsObject
Creates a new KSPOffline object, in case it does'n exist yet.- Parameters:
g
- the weighted graphdiameter
- the routes size can't be more than this value- Returns:
- the MyStatistics singletonObject
-
getPaths
public java.util.ArrayList<java.lang.Integer>[] getPaths(int source, int destination)Retrieves the all Paths without node repetition from the source and destination.- Parameters:
source
- the source nodedestination
- the destination node- Returns:
- the K-Shortest Paths
-
getKShortestPath
public java.util.ArrayList<java.lang.Integer> getKShortestPath(int source, int destination, int k)Retrieves the K-Path of the all Paths without node repetition from the source and destination.- Parameters:
source
- the source nodedestination
- the destination nodek
- the k-path, starts from = 0- Returns:
- the K-Path, starts from = 0
-