Ticket #4793 (closed Bugs: fixed)
copy_component does not work for graphs with edges.
|Reported by:||Christopher Alfeld <calfeld@…>||Owned by:||jewillco|
|Milestone:||To Be Determined||Component:||graph|
copy_component operates via a BFS visitor. The visitor adds vertices in examine_vertex and edges in examine_edge. The examine_edge routine assumes that examine_vertex has already been called for both sides of the edges, i.e., that both the source and target vertex have already been added to the copy graph. However, the BFS algorithm calls examine_edge *before* calling examine_vertex for its target. As a result, the target of the added edge is incorrect.
Concretely, in 1.44, graph/copy.hpp, line 365, the result of get(orig2copy, target(e,g_in)) will not be defined. I'll attach a simple program that attempts to copy a graph with 2 vertices and 1 edge before them and ends up with the wrong result.
- Owner changed from asutton to jewillco
- Status changed from new to assigned
- Status changed from assigned to closed
- Resolution set to fixed