<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/244883</link>
    <title>MATLAB Central Newsreader - bug with graphallshortestpaths?</title>
    <description>Feed for thread: bug with graphallshortestpaths?</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Thu, 19 Feb 2009 09:58:01 -0500</pubDate>
      <title>bug with graphallshortestpaths?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/244883#629397</link>
      <author>Petros </author>
      <description>I think there is a bug with graphallshortestpaths function. Here is an example with the problem.&lt;br&gt;
clear&lt;br&gt;
load A.mat&lt;br&gt;
% A.mat incudes only one sparce double 357x357 matrix called &quot;A&quot;   &lt;br&gt;
&lt;br&gt;
&lt;br&gt;
[DIST1] = graphallshortestpaths(A,'directed',false);&lt;br&gt;
% DIST1 includes unreached points (indicated with &quot;Inf&quot; )&lt;br&gt;
%this is the wrong behavior &lt;br&gt;
&lt;br&gt;
&lt;br&gt;
A2=A./1000;&lt;br&gt;
% I produce A2 with lower weith values.&lt;br&gt;
&lt;br&gt;
[DIST2] = graphallshortestpaths(A2,'directed',false);&lt;br&gt;
% DIST2 does not include unreached points (indicated with &quot;Inf&quot;), just &lt;br&gt;
%because the A matrix has lower weight values &lt;br&gt;
%this is the normal behavior &lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Any help is welcome &lt;br&gt;
&lt;br&gt;
below I post a link someone can download the example above as good as the A.mat in order to try it.&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://users.auth.gr/~painter/bug/bug_example.zip&quot;&gt;http://users.auth.gr/~painter/bug/bug_example.zip&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
MATLAB/PLATFORM INFO&lt;br&gt;
Release: R2008b&lt;br&gt;
Product: Bioinformatics Toolbox&lt;br&gt;
Product Version: 3.2&lt;br&gt;
Operating System: Windows Vista</description>
    </item>
    <item>
      <pubDate>Thu, 19 Feb 2009 14:30:20 -0500</pubDate>
      <title>Re: bug with graphallshortestpaths?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/244883#629463</link>
      <author>Lucio Andrade-Cetto</author>
      <description>Petros:&lt;br&gt;
&lt;br&gt;
This looks like a genuine bug, it can easily be reproducible with:&lt;br&gt;
graphashortestpath(sparse([1 2 2 3 4],[2 3 4 5 5],[100 97.362401 97.362400 100 100],5,5),1)&lt;br&gt;
&lt;br&gt;
Apparantly when the Jonhson's alg accumulates more than 197.3624 is marks the path as unreacheable.&lt;br&gt;
&lt;br&gt;
A possible workaround is either scale the weigth of the edges as you did it or use a loop with graphshortestpath.&lt;br&gt;
&lt;br&gt;
Lucio</description>
    </item>
    <item>
      <pubDate>Thu, 19 Feb 2009 16:39:01 -0500</pubDate>
      <title>Re: bug with graphallshortestpaths?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/244883#629511</link>
      <author>Petros </author>
      <description>&lt;br&gt;
&amp;gt; Apparantly when the Jonhson's alg accumulates more than 197.3624 is marks the path as unreacheable.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; A possible workaround is either scale the weigth of the edges as you did it or use a loop with graphshortestpath.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Lucio&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Yeap, that's it Lucio, thank you for the  immediate  response! I hope Mathworks to fix the problem with an update of graphallshortestpaths function. I am afraid that scaling the weights is going to  effect the accuracy. The loop option is not applicable for computation efficency reasons...    : - S  </description>
    </item>
    <item>
      <pubDate>Thu, 19 Feb 2009 16:51:02 -0500</pubDate>
      <title>Re: bug with graphallshortestpaths?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/244883#629513</link>
      <author>Lucio Andrade-Cetto</author>
      <description>We do have a fix now, I will post it later today in our customer support site.&lt;br&gt;
Lucio&lt;br&gt;
&lt;br&gt;
&quot;Petros&quot; &amp;lt;painter@geo.auth.gr&amp;gt; wrote in message &amp;lt;gnk1v5$5s7$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Apparantly when the Jonhson's alg accumulates more than 197.3624 is marks the path as unreacheable.&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; A possible workaround is either scale the weigth of the edges as you did it or use a loop with graphshortestpath.&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Lucio&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Yeap, that's it Lucio, thank you for the  immediate  response! I hope Mathworks to fix the problem with an update of graphallshortestpaths function. I am afraid that scaling the weights is going to  effect the accuracy. The loop option is not applicable for computation efficency reasons...    : - S  </description>
    </item>
    <item>
      <pubDate>Fri, 20 Feb 2009 19:14:01 -0500</pubDate>
      <title>Re: bug with graphallshortestpaths?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/244883#629780</link>
      <author>Lucio Andrade-Cetto</author>
      <description>There is a fix now available at:&lt;br&gt;
&lt;a href=&quot;http://www.mathworks.com/support/bugreports/details.html?rp=525696&quot;&gt;http://www.mathworks.com/support/bugreports/details.html?rp=525696&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
Lucio&lt;br&gt;
&lt;br&gt;
&quot;Lucio Andrade-Cetto&quot; &amp;lt;lcetto@nospam.mathworks.com&amp;gt; wrote in message &amp;lt;gnk2lm$ml7$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; We do have a fix now, I will post it later today in our customer support site.&lt;br&gt;
&amp;gt; Lucio&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &quot;Petros&quot; &amp;lt;painter@geo.auth.gr&amp;gt; wrote in message &amp;lt;gnk1v5$5s7$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; Apparantly when the Jonhson's alg accumulates more than 197.3624 is marks the path as unreacheable.&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; A possible workaround is either scale the weigth of the edges as you did it or use a loop with graphshortestpath.&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; Lucio&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Yeap, that's it Lucio, thank you for the  immediate  response! I hope Mathworks to fix the problem with an update of graphallshortestpaths function. I am afraid that scaling the weights is going to  effect the accuracy. The loop option is not applicable for computation efficency reasons...    : - S  </description>
    </item>
  </channel>
</rss>

