|
Optimization: principles and algorithms, by Michel Bierlaire
|
Algorithm 23.1: shortest paths. More...
Go to the source code of this file.
Functions | |
| function | shortestPath (in adj, in cost, in orig) |
| Calculate the shortest paths from one origin to all nodes. More... | |
Algorithm 23.1: shortest paths.
Implementation of algorithm 23.1 of [1]
Definition in file shortestPath.m.
| function shortestPath | ( | in | adj, |
| in | cost, | ||
| in | orig | ||
| ) |
Calculate the shortest paths from one origin to all nodes.
| adj | adjacency matrix of the network. Each nonzero entry corresponds to an arc. The value of the entry is the ID of the arc. |
| cost | the cost vector. |
| orig | the origin node |