|
3 | 3 | The original boost graph library (BGL1, located at `/home/phil/dev_graph/boost/libs/graph/`) has been |
4 | 4 | modernized to use C++20 (`BGL2`, located at `/home/phil/dev_graph/boost/libs/graph/modern/`). |
5 | 5 |
|
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: |
7 | 34 | - The differences between the vertex and edge descriptors. |
8 | 35 | - 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. |
11 | 39 |
|
12 | 40 | Algorithms have not been implemented for graph-v3 and is a known limitation. |
13 | 41 |
|
14 | | -Output the result to `aggents/bgl2_comparison_result.md`. |
| 42 | +Output the result to `agents/bgl2_comparison_result.md`. |
0 commit comments