Boost logo

Boost Users :

Subject: [Boost-users] [Graph] Assertion in two_bit_color_map
From: Maxime van Noppen (maxime_at_[hidden])
Date: 2011-07-07 11:21:56


Hi,

I'm getting an assertion failure that I don't understand.

/usr/include/boost/graph/two_bit_color_map.hpp:86: void boost::put(const
boost::two_bit_color_map<IndexMap>&, typename
boost::property_traits<PropMap>::key_type, boost::two_bit_color_type)
[with IndexMap =
boost::vec_adj_list_vertex_id_map<boost::property<boost::vertex_bundle_t, trade_graph::vertex,
boost::no_property>, long unsigned int>, typename
boost::property_traits<PropMap>::key_type = long unsigned int]:
Assertion `(std::size_t)i < pm.n' failed.

It's triggered by a call to dijkstra. I've attached the relevant part of
the backtrace to this mail. There's a lot of code involved and can't
reproduce a minimal test-case. Here's the call to dijkstra:

cost_map_t cmap(boost::num_vertices(cg));
predecessor_map_t pmap(boost::num_vertices(cg));

boost::dijkstra_shortest_paths(cg, src_rp->position(),
boost::predecessor_map(&pmap[0]).
                                distance_map(&cmap[0]).weight_map(
                                make_function_property_map<edge_t>
                                (boost::bind(&transaction::edge_cost_,
this, _1, boost::ref(g), quantity, src, dst))));

Any idea greatly appreciated, thanks!

-- 
Maxime



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