Supporting undirected CSR graphs
@jeremy-murphy is already working on this.
Since Feb 21, 2026.
Assessment
This issue has not been assessed yet.
Description
Problem
Currently, the Boost Graph Library's compressed_sparse_row_graph only supports directed and bidirectional graphs. There are explicit comments in the codebase and documentation indicating that undirected CSR support is a planned but unimplemented feature:
compressed_sparse_row_graph.hpp:At this time, the compressed sparse row graph can only be used to create directed and bidirectional graphs. In the future, undirected CSR graphs will also be supported.
doc/compressed_sparse_row.html:At this time, the CSR graph type only supports directed and bidirectional graphs...
This is problematic for several reasons, e.g. for adjusting performance in my Louvain's implementation algorithm: I can't use Louvain on directed graphs, but I can't use undirected CSR. Consequently a gap exists between BGL implementations and GenLouvain (that uses CSR). Having an undirected CSR could bridge that gap:
Feature Request
Add support for undirected compressed sparse row (CSR) graphs to compressed_sparse_row_graph. This would improve memory efficiency and performance for large undirected graphs, matching the benefits provided for directed graphs.
- 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
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NVIDIA/cuda-samples#453 ·