Skip to content

Adjmat#35

Merged
pratzl merged 7 commits into
mainfrom
adjmat
Jun 3, 2026
Merged

Adjmat#35
pratzl merged 7 commits into
mainfrom
adjmat

Conversation

@pratzl
Copy link
Copy Markdown
Collaborator

@pratzl pratzl commented Jun 2, 2026

No description provided.

pratzl added 7 commits May 31, 2026 17:40
…mdspan)

include/graph/container/adjacency_matrix.hpp:
- adjacency_matrix<EV, VId, Directed>: portable C++20 dense matrix that models
  index_adjacency_list via the inner-value pattern (matrix is a random-access
  range of lazily-filtered row views; edge elements live in an owned dense plane
  so target_id/edge_value resolve with stable references)
- md_adjacency_matrix<EV, VId, Directed>: C++23 variant (guarded by
  __cpp_lib_mdspan) exposing the presence plane as a 2-D std::mdspan with
  natural m(u,v) access
- O(1) has_edge/weight, O(n) per-vertex out-edge iteration, O(n^2) space

tests/container/adjacency_matrix/test_adjacency_matrix.cpp:
- static_asserts for adjacency_list / index_adjacency_list (weighted+unweighted)
- directed/undirected/weighted behaviour, vertices(), out_edges(), target_id,
  edge_value
- registered in tests/container/CMakeLists.txt
Add a dynamic_graph-style constructor taking the matrix order plus a
range of edges and a projection to copyable_edge_t<VId,EV>, used to
initialize the edges. Add user-guide documentation for adjacency_matrix
and md_adjacency_matrix, and mark the adjacency_matrix gap addressed in
the BGL migration scorecard.
# Conflicts:
#	agents/bgl_migration_strategy.md
@pratzl pratzl merged commit 2102372 into main Jun 3, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant