Boost logo

Boost Users :

Subject: Re: [Boost-users] Dijkstra shortest path
From: dwaem (dwaem_at_[hidden])
Date: 2009-03-23 11:22:55


Steven Watanabe-4 wrote:
>
> AMDG
>
> dwaem wrote:
>> int weight[] = {1, 1, 2, 2, 3, 4, 3, 4, 5, 6, 7};
>>
>> <snip>
>>
>> it shows
>> distances and parents:
>> distance(A) = 0, parent(A) = C
>> distance(B) = 0, parent(B) = A
>> distance(C) = 0, parent(C) = C
>> distance(D) = 0, parent(D) = C
>> distance(E) = 0, parent(E) = C
>>
>>
>> which makes no sense.
>>
>
> You're not using the weight array anywhere,
> so you get the default weight of 0 for every edge.
>
> In Christ,
> Steven Watanabe
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>

Yes this is my obviouse oversight.
But now when I have founded shortest path from node A to node B. How to
display full path from A to B, not only parent of the last node.

-- 
View this message in context: http://www.nabble.com/Dijkstra-shortest-path-tp22626827p22662345.html
Sent from the Boost - Users mailing list archive at Nabble.com.

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net