Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: bug with graphallshortestpaths?
Date: Thu, 19 Feb 2009 14:30:20 +0000 (UTC)
Organization: The MathWorks Inc
Lines: 10
Message-ID: <gnjqdr$q1m$1@fred.mathworks.com>
References: <gnjaf9$7ce$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1235053820 26678 172.30.248.35 (19 Feb 2009 14:30:20 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 19 Feb 2009 14:30:20 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 222043
Xref: news.mathworks.com comp.soft-sys.matlab:519445


Petros:

This looks like a genuine bug, it can easily be reproducible with:
graphashortestpath(sparse([1 2 2 3 4],[2 3 4 5 5],[100 97.362401 97.362400 100 100],5,5),1)

Apparantly when the Jonhson's alg accumulates more than 197.3624 is marks the path as unreacheable.

A possible workaround is either scale the weigth of the edges as you did it or use a loop with graphshortestpath.

Lucio