Package ons.util

Class YenKSP

java.lang.Object
ons.util.YenKSP

public class YenKSP
extends java.lang.Object
  • Constructor Summary

    Constructors 
    Constructor Description
    YenKSP()  
  • Method Summary

    Modifier and Type Method Description
    static java.util.ArrayList<java.lang.Integer>[] kShortestPaths​(WeightedGraph graph, int source, int destination, int K)  
    static java.util.ArrayList<java.lang.Integer>[] kShortestPaths​(WeightedMultiGraph graph, int source, int destination, int K)  
    static java.util.ArrayList<java.lang.Integer>[] kShortestPathsByHops​(WeightedGraph graph, int source, int destination, int K)  
    static java.util.ArrayList<java.lang.Integer>[] kShortestPathsByHops​(WeightedMultiGraph graph, int source, int destination, int K)  
    static int[] kShortestPathsIndex​(WeightedGraph graph, int source, int destination, int index)
    Retrieves the specific k-shortest path from source and destination (in path nodes)
    static int[] kShortestPathsIndex​(WeightedMultiGraph graph, int source, int destination, int index)
    Retrieves the specific k-shortest path from source and destination (in path nodes)
    static java.util.ArrayList<java.lang.Integer> subList​(java.util.ArrayList<java.lang.Integer> array, int fromIndex, int toIndex)  

    Methods inherited from class java.lang.Object

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

  • Method Details

    • kShortestPathsIndex

      public static int[] kShortestPathsIndex​(WeightedGraph graph, int source, int destination, int index)
      Retrieves the specific k-shortest path from source and destination (in path nodes)
      Parameters:
      graph - the WeightedGraph object
      source - the source node
      destination - the destination node
      index - the k index path
      Returns:
      the path nodes of specific k-shortest path index
    • kShortestPathsByHops

      public static java.util.ArrayList<java.lang.Integer>[] kShortestPathsByHops​(WeightedGraph graph, int source, int destination, int K)
    • kShortestPaths

      public static java.util.ArrayList<java.lang.Integer>[] kShortestPaths​(WeightedGraph graph, int source, int destination, int K)
    • subList

      public static java.util.ArrayList<java.lang.Integer> subList​(java.util.ArrayList<java.lang.Integer> array, int fromIndex, int toIndex)
    • kShortestPaths

      public static java.util.ArrayList<java.lang.Integer>[] kShortestPaths​(WeightedMultiGraph graph, int source, int destination, int K)
    • kShortestPathsIndex

      public static int[] kShortestPathsIndex​(WeightedMultiGraph graph, int source, int destination, int index)
      Retrieves the specific k-shortest path from source and destination (in path nodes)
      Parameters:
      graph - the WeightedGraph object
      source - the source node
      destination - the destination node
      index - the k index path
      Returns:
      the path nodes of specific k-shortest path index
    • kShortestPathsByHops

      public static java.util.ArrayList<java.lang.Integer>[] kShortestPathsByHops​(WeightedMultiGraph graph, int source, int destination, int K)