Class YenShortestPathIterator.YenShortestPathsTree

java.lang.Object
org.jgrapht.alg.shortestpath.TreeSingleSourcePathsImpl<V,E>
org.jgrapht.alg.shortestpath.YenShortestPathIterator.YenShortestPathsTree
All Implemented Interfaces:
Serializable, ShortestPathAlgorithm.SingleSourcePaths<V,E>
Enclosing class:
YenShortestPathIterator<V,E>

class YenShortestPathIterator.YenShortestPathsTree extends TreeSingleSourcePathsImpl<V,E>
Helper class which represents the shortest paths tree using which the spur parts are computed and appended to the candidate paths
  • Field Details

    • maskedVertices

      Set<V> maskedVertices
      Vertices which are masked in the g.
    • maskedEdges

      Set<E> maskedEdges
      Edges which are masked in the g.
  • Constructor Details

    • YenShortestPathsTree

      YenShortestPathsTree(Graph<V,E> maskSubgraph, Set<V> maskedVertices, Set<E> maskedEdges, Map<V,Pair<Double,E>> reversedTree, V treeSource)
      Constructs an instance of the shortest paths tree for the given maskSubgraph, maskedVertices, maskedEdges, reversedTree, treeSource.
      Parameters:
      maskSubgraph - graph which has removed vertices and edges
      maskedVertices - vertices removed form the graph
      maskedEdges - edges removed from the graph
      reversedTree - shortest path tree in the edge reversed maskSubgraph starting at treeSource.
      treeSource - source vertex of the reversedTree
  • Method Details

    • recoverVertex

      void recoverVertex(V v)
      Restores vertex v in the g.
      Parameters:
      v - vertex to be recovered
    • recoverEdge

      void recoverEdge(E e)
      Restores edge e in the g.
      Parameters:
      e - edge to be recovered
    • correctDistanceForward

      void correctDistanceForward(V v)
      Updates the distance of provided vertex v in the shortest paths tree based on the current distances of its successors in the g.
      Parameters:
      v - vertex which should be updated
    • correctDistanceBackward

      void correctDistanceBackward(V v)
      Updates the distance of relevant predecessors of the input vertex.
      Parameters:
      v - vertex which distance should be updated