Hi Line,
afaik there is no real documentation for the relaxed heap. It resides
in boost/pending/relaxed_heap.hpp. There's also a binary heap in
mutable_queue.hpp. Find below some basic code on how to initialize the
heaps
typedef graph_traits::vertex_descriptor vertex_t;
typedef property_map::const_type vertex_index_map_t;
// set up distance map
typedef iterator_property_map::iterator,
vertex_index_map_t> distance_map_t;
std::vector
distance_vector(num_vertices(graph),std::numeric_limits::max());
distance_map_t distances(distance_vector.begin(), vertex_indices);
typedef indirect_cmp indirect_cmp_t;
indirect_cmp_t icmp(distances, compare_t());
#ifdef MUTABLE
typedef mutable_queue,
indirect_cmp_t, vertex_index_map_t> Queue;
#endif
#ifdef RELAXED
typedef relaxed_heap Queue;
#endif
Queue Q(num_vertices(g), icmp, vertex_indices);
afterwards you can insert elements into the heap via Q.push( ... ),
get a reference to the first element via Q.top(), remove the first
with Q.pop(), update an element's position with Q.update( ... ), ask
if Q.empty() etc.
Regards, Moritz
On Fri, Jul 11, 2008 at 1:55 AM, Line Blander Reinhardt wrote:
Hi all
I would like to know where I can get some information about how to use the relaxed heaps in Boost?
I would also like to know which file/files it is located in?
Are there any bugs on relaxed heaps that has been fixed since 1.33.1 ?
Thanks alot for your help.
Line
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users