Opened 12 years ago

Closed 12 years ago

#4752 closed Bugs (wontfix)

subgraph::remove_vertex is not implemented

Reported by: Trevor Harmon <trevor@…> Owned by: Jeremiah Willcock
Milestone: To Be Determined Component: graph
Version: Boost 1.44.0 Severity: Problem
Keywords: Cc:

Description

Vertices in a subgraph cannot be removed because remove_vertex was never implemented. It was marked as a TODO in the original subgraph.hpp source code and has remained this way for over 3 years.

Change History (6)

comment:1 by Jeremiah Willcock, 12 years ago

Owner: changed from Andrew Sutton to Jeremiah Willcock
Status: newassigned

comment:2 by Jeremiah Willcock, 12 years ago

(In [66098]) Fixed remove_edge_if and clear_vertex for subgraphs; commented out remove_vertex; refs #4752; fixes #4753

comment:3 by Jeremiah Willcock, 12 years ago

(In [66100]) Merged r66097, r66098, and r66099 from trunk; refs #4758, #4752, #4753, #4631

comment:4 by Jeremiah Willcock, 12 years ago

Resolution: wontfix
Status: assignedclosed

I'm going to mark this as wontfix for now; please reopen it if you think it is important to fix.

comment:5 by Trevor Harmon <trevor@…>, 12 years ago

Resolution: wontfix
Status: closedreopened

I think this should be reopened. Remove_vertex is a common operation, and if left unimplemented, subgraphs are immutable. Actually, not totally immutable because edges can be removed, but then why implement remove_edge and leave out remove_vertex?

comment:6 by Jeremiah Willcock, 12 years ago

Resolution: wontfix
Status: reopenedclosed

I looked through to code to see what it would take to add remove_vertex, and it would be basically impossible to do. In particular, local vertex descriptors in subgraphs are indices into an std::vector, and so removing a vertex would invalidate many other vertex descriptors. If it is necessary to remove a vertex from a subgraph, it might be better to wrap the subgraph with a filtered_graph with a property map to hide the "removed" vertices. Using filtered_graph would often be better than subgraph for simple use cases, even without vertex removal.

Note: See TracTickets for help on using tickets.