The function does not check whether paths that are retrieved by converting higher-order shortest paths to first-order paths are indeed first-order shortest paths.
Example:
Given the following paths:
0->1->2
1->2->3
2->3->4
0->5->6
5->6->4
The algorithm will find two shortest paths between node 0 and 4, namely 0->1->2->3->4 and 0->5->6->4. However the first path has length 4, which is greater than the length of the latter path, which has length 3. So the first path is not a shortest path.
The function does not check whether paths that are retrieved by converting higher-order shortest paths to first-order paths are indeed first-order shortest paths.
Example:
Given the following paths: 0->1->2 1->2->3 2->3->4 0->5->6 5->6->4
The algorithm will find two shortest paths between node 0 and 4, namely 0->1->2->3->4 and 0->5->6->4. However the first path has length 4, which is greater than the length of the latter path, which has length 3. So the first path is not a shortest path.
Am I correct?