|
Algorithm 2: SLE for SPA preparation |
-
1:
Input: of all
-
2:
Output:
-
3:
Set,
: source node
: destination node
K: the number of shortest paths between and
: a path from to u
: a heap structure keeps paths
P: set of shortest paths from and
: number of shortest paths for node u
-
4:
Initialize,
-
5:
for all u node in do
-
6:
Insert path into with cost 0
-
7:
end for
-
8:
whiledo
-
9:
-
10:
-
11:
if then
-
12:
-
13:
end if
-
14:
if then
-
15:
for each adjacent to node u do
-
16:
new path with
-
17:
Insert into SPA
-
18:
end for
-
19:
end if
-
20:
end while
-
21:
return
|