First page Back Continue Last page Overview Graphics
Az irány számítása
Dijkstra féle legrövidebb út algoritmus
Legyen:
- N denotes set of nodes in the graph
- l (i, j) denotes non-negative cost (weight) for edge (i, j)
- s denotes this node
- M denotes the set of nodes incorporated so far
- C(n) denotes cost of the path from s to node n
M = {s}
for each n in N - {s}
while (N != M)
- M = M union {w} such that C(w)
- is the minimum for all w in (N - M)
- for each n in (N - M)
- C(n) = MIN(C(n), C (w) + l(w, n ))
Notes: