Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
graph allshortest paths

Subject: graph allshortest paths

From: Virtualized

Date: 8 Oct, 2009 10:26:45

Message: 1 of 5

Hi Everyone

I am trying to use the Matlab's built-in function
"graphallshortestpaths": It is working perfectly fine.

But i want to get more than one shortest paths between each pair of
nodes. So i have to somehow tweak this built in function. When i ran
the command : edit graphallshortestpaths
i found another function at the end of the file in the following form:

% call the mex implementation of the graph algorithms
if isempty(W)
    dist = graphalgs('all',debug_level,directed,G);
else
    dist = graphalgs('all',debug_level,directed,G,W);
end

I have tried to edit this function "graphalgs" to see what it actually
does but i get the following message:
"graphalgs does not exist. Do you want to create it?"

This is strange as this function is being called and is giving the
shortest paths but the error is also there.

Can anybody please tell me what is the problem here.

Thanking You

Best Regards

Subject: graph allshortest paths

From: Steven Lord

Date: 8 Oct, 2009 13:51:19

Message: 2 of 5


"Virtualized" <razzaqadil@gmail.com> wrote in message
news:a96f09b1-3233-46e8-a21a-01760db908e8@v2g2000vbb.googlegroups.com...
> Hi Everyone
>
> I am trying to use the Matlab's built-in function
> "graphallshortestpaths": It is working perfectly fine.
>
> But i want to get more than one shortest paths between each pair of
> nodes. So i have to somehow tweak this built in function. When i ran
> the command : edit graphallshortestpaths
> i found another function at the end of the file in the following form:
>
> % call the mex implementation of the graph algorithms
> if isempty(W)
> dist = graphalgs('all',debug_level,directed,G);
> else
> dist = graphalgs('all',debug_level,directed,G,W);
> end
>
> I have tried to edit this function "graphalgs" to see what it actually
> does but i get the following message:
> "graphalgs does not exist. Do you want to create it?"
>
> This is strange as this function is being called and is giving the
> shortest paths but the error is also there.
>
> Can anybody please tell me what is the problem here.

As the comment at the beginning of the code you quoted states, the graphalgs
function is a MEX-file that is used by GRAPHALLSHORTESTPATHS as well as
other graph algorithm functions. We do not distributed the source code for
that MEX-file so you will not be able to read it nor modify it.

--
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ

Subject: graph allshortest paths

From: Virtualized

Date: 8 Oct, 2009 14:13:55

Message: 3 of 5

On Oct 8, 3:51 pm, "Steven Lord" <sl...@mathworks.com> wrote:
> "Virtualized" <razzaqa...@gmail.com> wrote in message
>
> news:a96f09b1-3233-46e8-a21a-01760db908e8@v2g2000vbb.googlegroups.com...
>
>
>
>
>
> > Hi Everyone
>
> > I am trying to use the Matlab's built-in function
> > "graphallshortestpaths": It is working perfectly fine.
>
> > But i want to get more than one shortest paths between each pair of
> > nodes. So i have to somehow tweak this built in function. When i ran
> > the command : edit graphallshortestpaths
> > i found another function at the end of the file in the following form:
>
> > % call the mex implementation of the graph algorithms
> > if isempty(W)
> >    dist = graphalgs('all',debug_level,directed,G);
> > else
> >    dist = graphalgs('all',debug_level,directed,G,W);
> > end
>
> > I have tried to edit this function "graphalgs" to see what it actually
> > does but i get the following message:
> > "graphalgs does not exist. Do you want to create it?"
>
> > This is strange as this function is being called and is giving the
> > shortest paths but the error is also there.
>
> > Can anybody please tell me what is the problem here.
>
> As the comment at the beginning of the code you quoted states, the graphalgs
> function is a MEX-file that is used by GRAPHALLSHORTESTPATHS as well as
> other graph algorithm functions.  We do not distributed the source code for
> that MEX-file so you will not be able to read it nor modify it.
>
> --
> Steve Lord
> sl...@mathworks.com
> comp.soft-sys.matlab (CSSM) FAQ:http://matlabwiki.mathworks.com/MATLAB_FAQ

OK & Thank You for the clarification.

Best Regards

Subject: graph allshortest paths

From: Jack

Date: 28 Jun, 2010 02:51:07

Message: 4 of 5

Virtualized <razzaqadil@gmail.com> wrote in message <29f004d7-b793-4e35-94b2-634300eb1950@j28g2000vbl.googlegroups.com>...
> On Oct 8, 3:51 pm, "Steven Lord" <sl...@mathworks.com> wrote:
> > "Virtualized" <razzaqa...@gmail.com> wrote in message
> >
> > news:a96f09b1-3233-46e8-a21a-01760db908e8@v2g2000vbb.googlegroups.com...
> >
> >
> >
> >
> >
> > > Hi Everyone
> >
> > > I am trying to use the Matlab's built-in function
> > > "graphallshortestpaths": It is working perfectly fine.
> >
> > > But i want to get more than one shortest paths between each pair of
> > > nodes. So i have to somehow tweak this built in function. When i ran
> > > the command : edit graphallshortestpaths
> > > i found another function at the end of the file in the following form:
> >
> > > % call the mex implementation of the graph algorithms
> > > if isempty(W)
> > >    dist = graphalgs('all',debug_level,directed,G);
> > > else
> > >    dist = graphalgs('all',debug_level,directed,G,W);
> > > end
> >
> > > I have tried to edit this function "graphalgs" to see what it actually
> > > does but i get the following message:
> > > "graphalgs does not exist. Do you want to create it?"
> >
> > > This is strange as this function is being called and is giving the
> > > shortest paths but the error is also there.
> >
> > > Can anybody please tell me what is the problem here.
> >
> > As the comment at the beginning of the code you quoted states, the graphalgs
> > function is a MEX-file that is used by GRAPHALLSHORTESTPATHS as well as
> > other graph algorithm functions.  We do not distributed the source code for
> > that MEX-file so you will not be able to read it nor modify it.
> >
> > --
> > Steve Lord
> > sl...@mathworks.com
> > comp.soft-sys.matlab (CSSM) FAQ:http://matlabwiki.mathworks.com/MATLAB_FAQ
>
> OK & Thank You for the clarification.
>
> Best Regards

Hi Virtualized,
Did u manage to find a code that will give all possible shortest paths between any two nodes? I am working on something related and I need this code.

Many thanks

Subject: graph allshortest paths

From: Atieh Khamesi

Date: 11 Dec, 2013 15:24:05

Message: 5 of 5

Hi Jack,

Could you find any helpful code? I need the same code. Can you help me?

Thanks in advance,
Atieh

"Jack " <jack_sama_1981@yahoo.com> wrote in message <i092mr$lol$1@fred.mathworks.com>...
> Virtualized <razzaqadil@gmail.com> wrote in message <29f004d7-b793-4e35-94b2-634300eb1950@j28g2000vbl.googlegroups.com>...
> > On Oct 8, 3:51 pm, "Steven Lord" <sl...@mathworks.com> wrote:
> > > "Virtualized" <razzaqa...@gmail.com> wrote in message
> > >
> > > news:a96f09b1-3233-46e8-a21a-01760db908e8@v2g2000vbb.googlegroups.com...
> > >
> > >
> > >
> > >
> > >
> > > > Hi Everyone
> > >
> > > > I am trying to use the Matlab's built-in function
> > > > "graphallshortestpaths": It is working perfectly fine.
> > >
> > > > But i want to get more than one shortest paths between each pair of
> > > > nodes. So i have to somehow tweak this built in function. When i ran
> > > > the command : edit graphallshortestpaths
> > > > i found another function at the end of the file in the following form:
> > >
> > > > % call the mex implementation of the graph algorithms
> > > > if isempty(W)
> > > >    dist = graphalgs('all',debug_level,directed,G);
> > > > else
> > > >    dist = graphalgs('all',debug_level,directed,G,W);
> > > > end
> > >
> > > > I have tried to edit this function "graphalgs" to see what it actually
> > > > does but i get the following message:
> > > > "graphalgs does not exist. Do you want to create it?"
> > >
> > > > This is strange as this function is being called and is giving the
> > > > shortest paths but the error is also there.
> > >
> > > > Can anybody please tell me what is the problem here.
> > >
> > > As the comment at the beginning of the code you quoted states, the graphalgs
> > > function is a MEX-file that is used by GRAPHALLSHORTESTPATHS as well as
> > > other graph algorithm functions.  We do not distributed the source code for
> > > that MEX-file so you will not be able to read it nor modify it.
> > >
> > > --
> > > Steve Lord
> > > sl...@mathworks.com
> > > comp.soft-sys.matlab (CSSM) FAQ:http://matlabwiki.mathworks.com/MATLAB_FAQ
> >
> > OK & Thank You for the clarification.
> >
> > Best Regards
>
> Hi Virtualized,
> Did u manage to find a code that will give all possible shortest paths between any two nodes? I am working on something related and I need this code.
>
> Many thanks

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us