Class KShortestPathsStYen

All Implemented Interfaces:
KShortestPathsSt

public class KShortestPathsStYen extends KShortestPathsStBasedPathsTree
Yen's algorithm for computing the K shortest paths between two vertices in a graph.

This implementation is based on the paths compressed tree (the base class), which looks very different from the original algorithm, but it is indeed the same algorithm. This way of maintaining the paths is more efficient than the original algorithm, and improvements such as Lawler's are not necessary.

The algorithms runs in \(O(nk(m+n \log n))\) time.

Author:
Barak Ugav
See Also:
  • Constructor Details