Boost logo

Boost Users :

Subject: Re: [Boost-users] Dijkstra shortest path
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-03-20 17:33:15


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 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