Skip to content

Commit 1f5c1bd

Browse files
committed
Update BGL2 comparison: reflect full container selector support
- Updated bgl2_comparison_query.md with BGL2's 10 container selectors - Updated bgl2_comparison_result.md with comprehensive comparison: - BGL2 now supports vecS, listS, setS for vertices - BGL2 supports all 10 edge selectors (vecS, listS, setS, mapS, etc.) - Graph-v3 multi-layered flexibility: standard containers, concepts, traits, CSR - Added Section 4: Container Flexibility comparison - Updated code examples showing both libraries' capabilities - Fixed typos in query file (aggents -> agents, areeas -> areas)
1 parent 81f9a6e commit 1f5c1bd

File tree

2 files changed

+282
-46
lines changed

2 files changed

+282
-46
lines changed

agents/bgl2_comparison_query.md

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,40 @@
33
The original boost graph library (BGL1, located at `/home/phil/dev_graph/boost/libs/graph/`) has been
44
modernized to use C++20 (`BGL2`, located at `/home/phil/dev_graph/boost/libs/graph/modern/`).
55

6-
Compare and contrast BGL2 with the current library, making sure that the following topics are covered
6+
**BGL2 Container Selectors (Now Fully Implemented):**
7+
8+
BGL2 now supports 10 container selectors defined in `container_selectors.hpp`:
9+
10+
| Selector | Container | Characteristics |
11+
|----------|-----------|-----------------|
12+
| `vecS` | `std::vector` | O(1) random access, index-based descriptors |
13+
| `listS` | `std::list` | O(1) insertion/removal, stable iterator-based descriptors |
14+
| `setS` | `std::set` | O(log n), ordered unique elements, stable iterators |
15+
| `mapS` | `std::set` (for edges) | O(log n), key-value storage, prevents parallel edges |
16+
| `multisetS` | `std::multiset` | O(log n), ordered with duplicates allowed |
17+
| `multimapS` | `std::multiset` (for edges) | O(log n), duplicate keys allowed |
18+
| `hash_setS` | `std::unordered_set` | O(1) average, hash-based unique |
19+
| `hash_mapS` | `std::unordered_set` (for edges) | O(1) average, hash-based |
20+
| `hash_multisetS` | `std::unordered_multiset` | O(1) average, duplicates allowed |
21+
| `hash_multimapS` | `std::unordered_multiset` (for edges) | O(1) average, duplicate keys |
22+
23+
The `adjacency_list.hpp` provides implementations for:
24+
- **Vertex list selectors:** `vecS` (index-based), `listS` (iterator-based), `setS` (iterator-based)
25+
- **Out-edge list selectors:** All 10 selectors work for edge containers
26+
27+
**Key BGL2 Design Features:**
28+
- Selector concepts: `ContainerSelector`, `SequenceSelector`, `AssociativeSelector`, `UnorderedSelector`
29+
- Selector traits: `is_random_access`, `has_stable_iterators`, `is_ordered`, `is_unique`
30+
- `container_gen<Selector, ValueType>` maps selectors to container types
31+
- `parallel_edge_category_for<OutEdgeListS>` determines if parallel edges are allowed (based on `is_unique`)
32+
33+
Compare and contrast BGL2 with the current library (graph-v3), making sure that the following topics are covered:
734
- The differences between the vertex and edge descriptors.
835
- The ability to adapt to pre-existing graph data structures.
9-
- Strengths and weaknesses in the capabilities each library
10-
- Other areeas of interest in the design and flexibility for the libraries.
36+
- Strengths and weaknesses in the capabilities of each library.
37+
- Container flexibility: BGL2's selector-based approach vs graph-v3's trait-based approach.
38+
- Other areas of interest in the design and flexibility for the libraries.
1139

1240
Algorithms have not been implemented for graph-v3 and is a known limitation.
1341

14-
Output the result to `aggents/bgl2_comparison_result.md`.
42+
Output the result to `agents/bgl2_comparison_result.md`.

0 commit comments

Comments
 (0)