Boost logo

Boost Users :

Subject: Re: [Boost-users] Dijkstra Shortest path problem
From: Kya Bey (kyabey_at_[hidden])
Date: 2010-03-16 01:55:12


>
> //RESULTS in compiler errors. See below.
>> dijkstra_shortest_paths( g, src,
>> predecessor_map(&p[0]).distance_map(&d[0]) )
>> ;
>>
>
> You are missing the weight map, which is a required argument to
> dijkstra_shortest_paths. The graph in dijkstra-example.cpp has a built-in
> weight map (using old-style properties); the default method for finding
> weight maps does not find bundled properties named "weight".
>
>
That did it. I added the following
 predecessor_map(&p[0]).distance_map(&d[0]).weight_map(get(&edge_properties::weight,g))
)

and it worked ... Thanks a lot...



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