Boost logo

Boost Users :

From: Anton A. Patrushev (anton_at_[hidden])
Date: 2007-07-26 01:38:55


Hi,

I have a problem with Mutable queue.
I'm trying to store edge descriptors there, but sometimes (!) my program
fails with segmentation fault at mutable_queue.hpp:94 when I'm trying to
push an edge_descriptor into the queue.

There is a way how I declare and create the queue (entire code is to
long to include):

typedef typename property_traits<CostMap>::value_type C;

typedef indirect_cmp<CostMap, CompareFunction> IndirectCmp;
IndirectCmp icmp(cost, compare);

typedef mutable_queue<Edge, std::vector<Edge>, IndirectCmp, IndexMap>
MutableQueue;
    
MutableQueue Q(num_edges(g), icmp, index_map);

where g is VertexAndEdgeListGraph,
compare is std::less<C>(),
cost is weight_map(get(&Edge::cost, graph)),
index_map is property_map<graph_t, edge_index_t Edge::*>::type
edge_index = get(&Edge::index, graph)

My program fails here:

Q.push(s);

where
Q is declared above
s is typename graph_traits<IncidenceGraph>::edge_descriptor s

I guess, something is wrong with the Index Map.
Please, help me!

Thanks in advance,
Anton.


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