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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • getAllPathsObject

      public static AllPaths getAllPathsObject​(WeightedGraph g, double diameter)
      Creates a new KSPOffline object, in case it does'n exist yet.
      Parameters:
      g - the weighted graph
      diameter - 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 node
      destination - 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 node
      destination - the destination node
      k - the k-path, starts from = 0
      Returns:
      the K-Path, starts from = 0