Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Graph theory, allshortestpaths, show parts of the path
Date: Thu, 5 Nov 2009 16:35:03 +0000 (UTC)
Organization: The MathWorks Inc
Lines: 9
Message-ID: <hcuurn$fj3$1@fred.mathworks.com>
References: <hcuodf$liq$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1257438903 15971 172.30.248.37 (5 Nov 2009 16:35:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 5 Nov 2009 16:35:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 222043
Xref: news.mathworks.com comp.soft-sys.matlab:582784


Hello Adam:
If you have the Bioinformatics Toolbox you can use the first and third output of graphshortestpath, this function is -vectorized- which means that you do not have to repeat for every possible path, you only need to do it for every node. Recall that all shortest distances to a single node can well be represented by a tree of predecessors.
HTH 
Lucio

"Adam " <adamrimsky@seznam.cz> wrote in message <hcuodf$liq$1@fred.mathworks.com>...
> Hello, can somebody help me please?
> 
> I found a matlab built-in function allshortestpaths which is usefull for my needs but Iam looking for some expansion of this function. Result of this function is matrix with final values of all shortest paths between all nodes. What I need is next matrix or something similar where will be values of steps which are parts of final value in better case sequence of nodes from start to destination. For example: Value of shortest path between nodes 1 and 6 is 5 and I need to show result where will be shown, that value 5 is sum of 1, 2, 2(edges weights) or the path from 1 to 6 is sequence of nodes 1, 3, 5 and the same for all others result (1 to 5, 2 to 5 ...). Is this possible without use Dijkstra's algorithm for every path separately? Thank you for your help a excuse me for my bad English.