Opened 12 years ago
Closed 11 years ago
#5441 closed Bugs (wontfix)
add_edges in empty CSR graph
Reported by: | Owned by: | Andrew Sutton | |
---|---|---|---|
Milestone: | To Be Determined | Component: | graph |
Version: | Boost 1.42.0 | Severity: | Problem |
Keywords: | compressed_sparse_row_graph, add_edges, graphviz | Cc: |
Description
Hi,
I'm using Boost 1.42 (but I guess the problem is still there in 1.46) and I get a strange behavior after using the method add_edges from CSR graph. Here is a summary of what I'm doing: My simple graph is described in test.dot
1) I create an empty CSR graph g 2) I add a total of 3 edges (those described in the GraphViz file) thanks to the method add_edges (and my own iterators) because read_graphviz doesn't work with CSR graph. 3) num_edges is equal to 3 but num_vertices is equal to 0 instead of 3! 4) If I try to iterate on the edges with BGL_FORALL_EDGES(e, g, graph_t), I get nothing!
add_edges should create vertices also, shouldn't it? If not, I expect it throws at least an error if it finds an unknown vertex...
The full example code that produces this _bug_ is available here: http://tinyurl.com/csr-add-edges-error
Attachments (1)
Change History (2)
by , 12 years ago
comment:1 by , 11 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
BGL does not have checks for out-of-bounds accesses in many places, and so crashing on use of invalid vertex descriptors will not be fixed.
Simple GraphViz file to give as input of the program