Opened 12 years ago
Closed 12 years ago
#4752 closed Bugs (wontfix)
subgraph::remove_vertex is not implemented
Reported by: | 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 , 12 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 12 years ago
comment:3 by , 12 years ago
comment:4 by , 12 years ago
Resolution: | → wontfix |
---|---|
Status: | assigned → closed |
I'm going to mark this as wontfix for now; please reopen it if you think it is important to fix.
comment:5 by , 12 years ago
Resolution: | wontfix |
---|---|
Status: | closed → reopened |
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 , 12 years ago
Resolution: | → wontfix |
---|---|
Status: | reopened → closed |
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.
(In [66098]) Fixed remove_edge_if and clear_vertex for subgraphs; commented out remove_vertex; refs #4752; fixes #4753