Optimization: principles and algorithms, by Michel Bierlaire
shortestPath.m File Reference

Algorithm 23.1: shortest paths. More...

Go to the source code of this file.


function shortestPath (in adj, in cost, in orig)
 Calculate the shortest paths from one origin to all nodes. More...

Detailed Description

Algorithm 23.1: shortest paths.

Implementation of algorithm 23.1 of [1]

Tested with runShortestPath.m
Calls prepareNetwork
Michel Bierlaire
Thu Apr 9 17:20:42 2015

Definition in file shortestPath.m.

Function Documentation

function shortestPath ( in  adj,
in  cost,
in  orig 

Calculate the shortest paths from one origin to all nodes.

adjadjacency matrix of the network. Each nonzero entry corresponds to an arc. The value of the entry is the ID of the arc.
costthe cost vector.
origthe origin node
lambda the vector of labels
pred the vector of the predecessors in the shortest path
Copyright 2015-2016 Michel Bierlaire