I figure it out when I tried to put a label= 600000000, my computer ran out of memory.
/**
* Choose the default map instance. If Label is an unsigned integral type
* the we can use a vector to store the information.
*/
template <typename Label, typename Vertex>
struct choose_default_map {
typedef typename mpl::if_<
is_unsigned<Label>,
std::vector<Vertex>,
std::map<Label, Vertex> // TODO: Should use unordered_map?
>::type type;
};
> I have checked the internal map.It looks like a broken assumption in the design of labeled_graph
> If I add a single node in the graph, map.size() == 42. Instead of 1 !
> If I add 5 nodes size() == 248.
>
> So any label number inferior to map.size() will give false results ...
>
> What's going on ?
(which is mostly experimental), that any use of integral labels would
be in the range [0, num_vertices(g)). When you insert a new label, it
is automatically resizing the container to accommodate your new label.
You may be better off not using labeled_graph.
Andrew
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users