`compressed_sparse_row_graph` has orphaned `add_vertex()` / `add_vertices()` from removed interface
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 38/100
Research direction
Start by reading compressed_sparse_row_graph.hpp and test/csr_graph_test.cpp, then compare the old and new CSR documentation and the cited history. Determine whether the orphaned add_vertex() and add_vertices() interface should remain; done means the header, documentation, and tests consistently reflect the decided interface.
Written by the indexing model from the issue text.
Description
Problem
compressed_sparse_row_graph.hpp contains four public add_vertex / add_vertices functions that were part of an old interface deliberately removed in 2009:
Vertex add_vertex(compressed_sparse_row_graph& g);
Vertex add_vertex(compressed_sparse_row_graph& g, const vertex_bundled& p); // directed
Vertex add_vertex(compressed_sparse_row_graph& g, const vertex_bundled& p); // bidirectional
Vertex add_vertices(vertices_size_type count, compressed_sparse_row_graph& g); // directed
These are not in the HTML documentation, not tested in test/csr_graph_test.cpp, and not used anywhere in BGL internally.
Meanwhile, the documentation states: "The CSR graph is immutable after construction. You cannot call add_vertex()."
The related add_edges() and add_edges_sorted() functions are documented and tested.
History
- 2005 (
0e2f4646): Jeremiah Willcock addedadd_vertex(),add_vertices(), andadd_edges()as "incremental construction functions." All three were documented and tested. - 2009 (
b2636ec3, "Removed old CSR interface; fixes #3135 "):add_vertex()andadd_vertices()were removed from documentation and tests, but the implementations were left in the header. - 2012 (
849d1538):add_edges()was separately removed from bidirectional CSR as "broken and not documented."
Question
Should add_vertex() / add_vertices() be tested and documented, or removed? Probably removed I guess, but I find it odd the implementation was never actually removed.
- Dominant language
- C++
- Stars
- 395
- Forks
- 239
- Avg merge
- 18h 50m
- Merged PRs (30d)
- 20
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from boostorg/graph
-
beginner friendly
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
algorithm beginner friendly priority: high
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
-
priority: high warning
-
algorithm
boostorg/graph#493 · 22 comments · 1 reaction · 2 assignees ·
Similar issues
-
enhancement
Difficulty 1/5 Under an hour Newbie friendliness 88/100
QuantStack/git2cpp#187 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
mlcommons/mobile_app_open#1182 ·
-
Needs-Triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
microsoft/winget-cli#6547 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·