Boost logo

Boost Users :

Subject: [Boost-users] [BGL] A* queue size not mutable
From: Arnaud Masserann (arnaud1602_at_[hidden])
Date: 2009-12-22 06:52:36


Hi,

I'm using the BGL to explore an implicit graph. At the beginning, I only
have one node, and no arc. And I instanciate new nodes and their
corresponding arc on-the-fly in the A* visitor ( in examine_vertex ).

However, the A* algorithm internally uses this queue :
    MutableQueue Q(num_vertices(g), icmp, index_map);
which means that I'm supposed to :
 - know how many vertices I'm gonna need during the search, which I don't
 - Instanciate them all...

Any hints here ?

Notes :
I use astar_search_no_init, and property maps based on std::map so that
put() can index it in a not-known-yet location.
Btw, my color map type is std::map<NodeID,boost::default_color_type > (plus
the wrapper around it). I feel that using "boost::default_color_type" is
kind of a hack. Is it ?

Thanks
Arnaud

Arnaud



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