Boost logo

Boost Users :

Subject: Re: [Boost-users] [Graph]remove_edge
From: Andrew Sutton (andrew.n.sutton_at_[hidden])
Date: 2008-11-29 07:26:43

> using the graph concepts for a case where I frequently add or remove
> edges I came across an inconsistency:
> removing an edge may invalidate the edge counter because it does not
> check whether the edge existed or not. This is the code from the header
> file boost/graph/adjacency_matrix.hpp:
> template <typename D, typename VP, typename EP, typename GP, typename A>
> void
> remove_edge(typename adjacency_matrix<D,VP,EP,GP,A>::vertex_descriptor
> u,
> typename adjacency_matrix<D,VP,EP,GP,A>::vertex_descriptor
> v,
> adjacency_matrix<D,VP,EP,GP,A>& g)
> {
> --(g.m_num_edges);
> detail::set_edge_exists(g.get_edge(u,v), false, 0);
> }

That definitely looks like a problem. Can I get you to file a ticket for it
on I can address the issue on monday.

Andrew Sutton

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at