Re: [jgrapht-users] Dijktra shorthest problem with subgraphs
Brought to you by:
barak_naveh,
perfecthash
From: Kyle L. <ky...@ar...> - 2005-06-23 13:16:37
|
I looked at the code The Subgraph class has a bug (or more). TheDijkstraShortestPath will eventually use Subgraph.outgoingEdgesOf(). Here is the code: public List outgoingEdgesOf( Object vertex ) { return ( (DirectedGraph) *m_base* ).outgoingEdgesOf( vertex ); } Notice that the m_base is the original supergraph, not some subset. Julien Thomas de Boer wrote: >Hello everyone, >Does someone know why this problem occurs : >Given a ListenableDirectedWeighted graph g. I build the subgraph s from >g. Imagine now I want to check the path between two nodes, A and B >(connected in g but not in s). When I use : >List chemin = DijkstraShortestPath.findPathBetween(s,"A","B"); >In chemin, it returns the path in g but not in s. >How is it possible ? Do you know how to solve this problem ? Thanks a >lot for your attention. > > > > -- ---------------------------------------------------------------------- Kyle Lahnakoski ky...@ar... (416) 892-7784 Arcavia Software Ltd |