Skip to content

Commit b18ced3

Browse files
committed
Rename vertex_info/edge_info/neighbor_info to vertex_data/edge_data/neighbor_data\n\nRename graph_info.hpp to graph_data.hpp and the three corresponding\ntest files. Update all references across headers, source, tests, and\ndocumentation. Fix a variable-shadowing conflict in\nundirected_adjacency_list_impl.hpp caused by the rename."
1 parent 8dd4216 commit b18ced3

63 files changed

Lines changed: 879 additions & 879 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

agents/archive/cpo_extraction_summary.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Successfully extracted shared edge CPO implementations (`source_id`, `target_id`
3131
3. ADL with descriptor
3232
4. adj_list::edge_descriptor member (Tier 4)
3333
5. edge_list::edge_descriptor member (Tier 5)
34-
6. edge_info data member (Tier 6)
34+
6. edge_data data member (Tier 6)
3535
7. Tuple-like edge (Tier 7, lowest priority)
3636

3737
**CPO Signatures:**
@@ -47,7 +47,7 @@ namespace graph {
4747
- CPOs work identically for both adjacency lists and edge lists
4848
- Eliminates tight coupling between namespaces
4949
- Follows principle that identical-behavior CPOs should be in shared location
50-
- Supports multiple edge representations (descriptors, edge_info, tuples)
50+
- Supports multiple edge representations (descriptors, edge_data, tuples)
5151
5252
### 3. Updated `include/graph/adj_list/detail/graph_cpo.hpp`
5353
**Changes:**
@@ -150,7 +150,7 @@ Replaced all 8 references to `graph::adj_list::_cpo_instances` with `graph::`:
150150
- Test suite covers:
151151
- All CPO resolution paths (member, ADL, descriptor, default)
152152
- Both adjacency lists and edge lists
153-
- Multiple edge representations (descriptors, edge_info, tuples)
153+
- Multiple edge representations (descriptors, edge_data, tuples)
154154
- Integration tests for graph traversal
155155
- Const correctness
156156
- Empty graph edge cases
@@ -213,7 +213,7 @@ Each shared edge CPO uses the same resolution order:
213213
5. **edge_list descriptor** - `uv.target_id()` (on edge_list::edge_descriptor)
214214
- Built-in edge list support
215215

216-
6. **edge_info member** - `uv.target_id` (data member)
216+
6. **edge_data member** - `uv.target_id` (data member)
217217
- Direct member access for simple structs
218218

219219
7. **Tuple-like** - `std::get<N>(uv)`

agents/archive/design_review.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ The library does not have algorithms defined yet. They will be implemented after
2323
**Issues to Review:**
2424
- Views are in `graph::views::` but most CPOs are in `graph::adj_list::` - is this consistent?
2525
- Should views be `graph::views::` or `graph::adj_list::views::`?
26-
- Types from `graph_info.hpp` are in `graph::` - should they be in a dedicated namespace?
26+
- Types from `graph_data.hpp` are in `graph::` - should they be in a dedicated namespace?
2727
- What symbols should be imported into `graph::` namespace vs staying in subnamespaces?
2828
- Are descriptor types appropriately placed in `graph::adj_list::`?
2929

agents/archive/design_review_results.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ graph.hpp
8484
├── adj_list/vertex_descriptor_view.hpp
8585
├── adj_list/edge_descriptor.hpp
8686
├── adj_list/edge_descriptor_view.hpp
87-
├── graph_info.hpp
87+
├── graph_data.hpp
8888
├── edge_list/edge_list_traits.hpp
8989
├── edge_list/edge_list_descriptor.hpp
9090
├── edge_list/edge_list.hpp
@@ -259,7 +259,7 @@ Container implementations are mature, well-documented, and fully conformant with
259259
260260
**Design Pattern:**
261261
- Views constrained on `adj_list::adjacency_list` or `adj_list::index_adjacency_list` concepts
262-
- Return `vertex_info`, `edge_info`, `neighbor_info` structs for structured bindings
262+
- Return `vertex_data`, `edge_data`, `neighbor_data` structs for structured bindings
263263
- Support optional value functions (VVF, EVF)
264264
- Range adaptor closures for pipe syntax
265265
@@ -268,7 +268,7 @@ Container implementations are mature, well-documented, and fully conformant with
268268
| Issue | Severity | Description |
269269
|-------|----------|-------------|
270270
| Views use `adj_list::` concepts | Medium | Views constrained on `adj_list::adjacency_list` - what about edge_list views? |
271-
| Naming inconsistency | Low | `vertexlist` (no underscore) vs `vertex_info` (with underscore in type name) |
271+
| Naming inconsistency | Low | `vertexlist` (no underscore) vs `vertex_data` (with underscore in type name) |
272272
| Value function limitation | Low | Capturing lambdas break view chaining (documented in headers, C++20 limitation) |
273273
| No edge_list-specific views | Medium | Views designed for adjacency lists; edge_list would need separate implementation |
274274
@@ -841,7 +841,7 @@ The graph library is well-designed and mature. The core architecture (descriptor
841841

842842
3. **Fixed circular dependency in `edge_list.hpp`**
843843
- Removed `#include "../graph.hpp"` from edge_list.hpp
844-
- Replaced with minimal includes: `detail/edge_cpo.hpp`, `graph_info.hpp`
844+
- Replaced with minimal includes: `detail/edge_cpo.hpp`, `graph_data.hpp`
845845
- Eliminates circular dependency: graph.hpp → views/edgelist.hpp → edge_list/edge_list.hpp → graph.hpp
846846
- Edge list now uses shared CPOs from `graph::` namespace
847847

agents/archive/edge_list_goal.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
The abstract edge list, a complement to the abstract adjacency list, needs to be implemented.
44

55
An edge list is a range of edge values that have a target_id, source_id and optional edge_value.
6-
This can be represented by projecting values on into an `edge_info` data structure defined in
7-
`graph_info.hpp`. This is an example, and other methods should be considered to implement it.
6+
This can be represented by projecting values on into an `edge_data` data structure defined in
7+
`graph_data.hpp`. This is an example, and other methods should be considered to implement it.
88

99
## Edge Lists Types and Naming
1010
The term edge list has different forms.
@@ -35,6 +35,6 @@ layout, including the `edge_list/` subdirectory for the edge list implementation
3535
as a reference design. The implementation for this library may need to be different.
3636

3737
## Important Details
38-
`graph_info.hpp` contains common definitions of classes/structs that are shared between both the
39-
adjacency list and edge list data structures. While `edge_info` is the primary shared type, others
38+
`graph_data.hpp` contains common definitions of classes/structs that are shared between both the
39+
adjacency list and edge list data structures. While `edge_data` is the primary shared type, others
4040
could be added in the future.

agents/archive/edge_list_plan.md

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ executed by an agent and includes specific tasks, files to modify, and tests to
1717
| Step | Description | Status | Commit |
1818
|------|-------------|--------|--------|
1919
| 1.1 | Add `is_edge_list_descriptor_v` trait | ✅ Complete | 4997cb3 |
20-
| 1.2 | Add `_has_edge_info_member` concept to `source_id` CPO | ✅ Complete | |
20+
| 1.2 | Add `_has_edge_data_member` concept to `source_id` CPO | ✅ Complete | |
2121
| 1.3 | Add `_is_tuple_like_edge` concept to `source_id` CPO | ✅ Complete | |
22-
| 1.3a | Add `_has_edge_info_member` and `_is_tuple_like_edge` to `target_id` CPO | ✅ Complete | |
23-
| 1.3b | Add `_has_edge_info_member` and `_is_tuple_like_edge` to `edge_value` CPO | ✅ Complete | |
22+
| 1.3a | Add `_has_edge_data_member` and `_is_tuple_like_edge` to `target_id` CPO | ✅ Complete | |
23+
| 1.3b | Add `_has_edge_data_member` and `_is_tuple_like_edge` to `edge_value` CPO | ✅ Complete | |
2424
| 1.4 | Extend `source_id` CPO with tiers 5-7 | ✅ Complete | |
2525
| 1.5 | Create tests for `source_id` CPO extensions | ✅ Complete | |
2626
| 2.1 | Extend `target_id` CPO with tiers 5-7 | ✅ Complete | |
@@ -93,24 +93,24 @@ inline constexpr bool is_edge_list_descriptor_v = is_edge_list_descriptor<T>::va
9393
9494
---
9595
96-
### Step 1.2: Add `_has_edge_info_member` Concept
96+
### Step 1.2: Add `_has_edge_data_member` Concept
9797
98-
**Goal**: Add concept to detect edge_info-style data member access (Tier 6).
98+
**Goal**: Add concept to detect edge_data-style data member access (Tier 6).
9999
100100
**Files to modify**:
101101
- `include/graph/adj_list/detail/graph_cpo.hpp`
102102
103103
**Tasks**:
104104
1. Locate `namespace _source_id` in `graph_cpo.hpp`
105105
2. Add include for `edge_list_traits.hpp` at top of file
106-
3. Add `_has_edge_info_member` concept after existing concepts
106+
3. Add `_has_edge_data_member` concept after existing concepts
107107
108108
**Code to add** (inside `namespace _source_id`):
109109
```cpp
110-
// Tier 6: Check for edge_info-style direct data member access
110+
// Tier 6: Check for edge_data-style direct data member access
111111
// Must NOT be a descriptor type (to avoid ambiguity with method calls)
112112
template<typename UV>
113-
concept _has_edge_info_member =
113+
concept _has_edge_data_member =
114114
!is_edge_descriptor_v<std::remove_cvref_t<UV>> &&
115115
!edge_list::is_edge_list_descriptor_v<std::remove_cvref_t<UV>> &&
116116
requires(const UV& uv) {
@@ -123,7 +123,7 @@ concept _has_edge_info_member =
123123

124124
**Tests**: Created in Step 1.5
125125

126-
**Commit message**: `Add _has_edge_info_member concept to source_id CPO`
126+
**Commit message**: `Add _has_edge_data_member concept to source_id CPO`
127127

128128
---
129129

@@ -136,17 +136,17 @@ concept _has_edge_info_member =
136136

137137
**Tasks**:
138138
1. Locate `namespace _source_id` in `graph_cpo.hpp`
139-
2. Add `_is_tuple_like_edge` concept after `_has_edge_info_member`
139+
2. Add `_is_tuple_like_edge` concept after `_has_edge_data_member`
140140

141141
**Code to add** (inside `namespace _source_id`):
142142
```cpp
143143
// Tier 7: Check for tuple-like edge (pair, tuple)
144-
// Must NOT be any descriptor type or have edge_info members
144+
// Must NOT be any descriptor type or have edge_data members
145145
template<typename UV>
146146
concept _is_tuple_like_edge =
147147
!is_edge_descriptor_v<std::remove_cvref_t<UV>> &&
148148
!edge_list::is_edge_list_descriptor_v<std::remove_cvref_t<UV>> &&
149-
!_has_edge_info_member<UV> &&
149+
!_has_edge_data_member<UV> &&
150150
requires {
151151
std::tuple_size<std::remove_cvref_t<UV>>::value;
152152
} &&
@@ -171,7 +171,7 @@ concept _is_tuple_like_edge =
171171
172172
**Tasks**:
173173
1. Locate `namespace _target_id` in `graph_cpo.hpp`
174-
2. Add `_has_edge_info_member` concept (checks `uv.target_id` data member)
174+
2. Add `_has_edge_data_member` concept (checks `uv.target_id` data member)
175175
3. Add `_is_tuple_like_edge` concept (same as source_id)
176176
177177
**Status**: ✅ Complete (implemented alongside source_id concepts)
@@ -187,12 +187,12 @@ concept _is_tuple_like_edge =
187187
188188
**Tasks**:
189189
1. Locate `namespace _edge_value` in `graph_cpo.hpp`
190-
2. Add `_has_edge_info_member` concept (checks `uv.value` data member)
190+
2. Add `_has_edge_data_member` concept (checks `uv.value` data member)
191191
3. Add `_is_tuple_like_edge` concept (checks for `std::get<2>` since edge value is third element)
192192
193193
**Status**: ✅ Complete (implemented alongside source_id concepts)
194194
195-
**Commit message** (for 1.2, 1.3, 1.3a, 1.3b combined): `Add edge_info and tuple-like concepts to all three CPOs`
195+
**Commit message** (for 1.2, 1.3, 1.3a, 1.3b combined): `Add edge_data and tuple-like concepts to all three CPOs`
196196
197197
---
198198
@@ -205,7 +205,7 @@ concept _is_tuple_like_edge =
205205
206206
**Tasks**:
207207
1. Rename `_descriptor` to `_adj_list_descriptor` in `_St` enum
208-
2. Add new enum values: `_edge_list_descriptor`, `_edge_info_member`, `_tuple_like`
208+
2. Add new enum values: `_edge_list_descriptor`, `_edge_data_member`, `_tuple_like`
209209
3. Update `_Choose()` function to check new tiers in order
210210
4. Update `_fn::operator()` to handle new strategies
211211
5. Ensure noexcept propagation for new tiers
@@ -219,7 +219,7 @@ enum class _St {
219219
_adl,
220220
_adj_list_descriptor, // RENAMED from _descriptor
221221
_edge_list_descriptor, // NEW
222-
_edge_info_member, // NEW
222+
_edge_data_member, // NEW
223223
_tuple_like // NEW
224224
};
225225
```
@@ -229,8 +229,8 @@ enum class _St {
229229
} else if constexpr (_has_edge_list_descriptor<UV>) {
230230
return {_St::_edge_list_descriptor,
231231
noexcept(std::declval<const UV&>().source_id())};
232-
} else if constexpr (_has_edge_info_member<UV>) {
233-
return {_St::_edge_info_member,
232+
} else if constexpr (_has_edge_data_member<UV>) {
233+
return {_St::_edge_data_member,
234234
noexcept(std::declval<const UV&>().source_id)};
235235
} else if constexpr (_is_tuple_like_edge<UV>) {
236236
return {_St::_tuple_like,
@@ -241,7 +241,7 @@ enum class _St {
241241
```cpp
242242
} else if constexpr (_Choice<_G, _UV>._Strategy == _St::_edge_list_descriptor) {
243243
return uv.source_id();
244-
} else if constexpr (_Choice<_G, _UV>._Strategy == _St::_edge_info_member) {
244+
} else if constexpr (_Choice<_G, _UV>._Strategy == _St::_edge_data_member) {
245245
return uv.source_id;
246246
} else if constexpr (_Choice<_G, _UV>._Strategy == _St::_tuple_like) {
247247
return std::get<0>(uv);
@@ -269,9 +269,9 @@ enum class _St {
269269

270270
**Test cases to implement**:
271271
```cpp
272-
// Test Tier 6: edge_info data member
273-
TEST_CASE("source_id with edge_info", "[cpo][source_id]") {
274-
using EI = graph::edge_info<int, true, void, void>;
272+
// Test Tier 6: edge_data data member
273+
TEST_CASE("source_id with edge_data", "[cpo][source_id]") {
274+
using EI = graph::edge_data<int, true, void, void>;
275275
EI ei{1, 2};
276276
std::vector<EI> el{ei};
277277

@@ -340,7 +340,7 @@ add_test(NAME test_edge_list_cpo COMMAND test_edge_list_cpo)
340340
4. Update `_Choose()` and `operator()` functions
341341

342342
**Key differences from `source_id`**:
343-
- `_has_edge_info_member` checks `uv.target_id` instead of `uv.source_id`
343+
- `_has_edge_data_member` checks `uv.target_id` instead of `uv.source_id`
344344
- Tuple tier uses `std::get<1>(uv)` instead of `std::get<0>(uv)`
345345

346346
**Commit message**: `Extend target_id CPO with tiers 5-7 for edge_list support`
@@ -378,7 +378,7 @@ add_test(NAME test_edge_list_cpo COMMAND test_edge_list_cpo)
378378
4. Update `_Choose()` and `operator()` functions
379379

380380
**Key differences**:
381-
- `_has_edge_info_member` checks `uv.value` instead of `uv.source_id`
381+
- `_has_edge_data_member` checks `uv.value` instead of `uv.source_id`
382382
- Tuple tier uses `std::get<2>(uv)` for the edge value
383383
- Not all edge types have values (pair<T,T> does not)
384384

@@ -388,15 +388,15 @@ add_test(NAME test_edge_list_cpo COMMAND test_edge_list_cpo)
388388

389389
### Step 3.2: Create Tests for `edge_value` CPO Extensions
390390

391-
**Goal**: Test edge_value with edge_info and tuple types.
391+
**Goal**: Test edge_value with edge_data and tuple types.
392392

393393
**Files to modify**:
394394
- `tests/edge_list/test_edge_list_cpo.cpp`
395395

396396
**Tasks**:
397-
1. Add test cases for `edge_value` with `edge_info<VId,true,void,EV>`
397+
1. Add test cases for `edge_value` with `edge_data<VId,true,void,EV>`
398398
2. Add test cases for `edge_value` with `tuple<T,T,EV>`
399-
3. Verify types without values (pair, edge_info without EV) don't satisfy edge_value
399+
3. Verify types without values (pair, edge_data without EV) don't satisfy edge_value
400400

401401
**Commit message**: `Add tests for edge_value CPO tiers 5-7`
402402

@@ -651,7 +651,7 @@ concept basic_sourced_edgelist =
651651
652652
**Status**: ✅ COMPLETE (2026-01-31) - Tests already created in Step 5.1
653653
- test_edge_list_concepts.cpp covers all required test cases
654-
- Includes concept satisfaction tests for pairs, tuples, edge_info, edge_descriptor
654+
- Includes concept satisfaction tests for pairs, tuples, edge_data, edge_descriptor
655655
- Tests with string vertex IDs to verify non-integral support
656656
- Type alias validation tests
657657
- Runtime behavior tests with CPOs
@@ -669,7 +669,7 @@ concept basic_sourced_edgelist =
669669
- `tests/edge_list/test_edge_list_concepts.cpp` (NEW)
670670
671671
**Tasks**:
672-
1. Test concept satisfaction with pair, tuple, edge_info
672+
1. Test concept satisfaction with pair, tuple, edge_data
673673
2. Test concept satisfaction with edge_list::edge_descriptor
674674
3. Verify adjacency_list does NOT satisfy basic_sourced_edgelist
675675
@@ -680,7 +680,7 @@ TEST_CASE("basic_sourced_edgelist concept", "[edge_list][concepts]") {
680680
681681
static_assert(basic_sourced_edgelist<std::vector<std::pair<int,int>>>);
682682
static_assert(basic_sourced_edgelist<std::vector<std::tuple<int,int,double>>>);
683-
static_assert(basic_sourced_edgelist<std::vector<graph::edge_info<int,true,void,void>>>);
683+
static_assert(basic_sourced_edgelist<std::vector<graph::edge_data<int,true,void,void>>>);
684684
static_assert(basic_sourced_edgelist<std::vector<edge_descriptor<int,void>>>);
685685
686686
// Should NOT satisfy (nested range = adjacency list pattern)
@@ -751,8 +751,8 @@ TEST_CASE("Algorithm works with different edge sources", "[integration]") {
751751
std::vector<std::pair<int,int>> pairs{{1,2}, {3,3}, {4,4}};
752752
REQUIRE(count_self_loops(pairs) == 2);
753753

754-
// With edge_info
755-
using EI = graph::edge_info<int, true, void, void>;
754+
// With edge_data
755+
using EI = graph::edge_data<int, true, void, void>;
756756
std::vector<EI> infos{{1,2}, {5,5}};
757757
REQUIRE(count_self_loops(infos) == 1);
758758

@@ -768,7 +768,7 @@ TEST_CASE("Algorithm works with different edge sources", "[integration]") {
768768
**Status**: ✅ COMPLETE (2026-01-31)
769769
- Created test_edge_list_integration.cpp with 16 comprehensive test cases
770770
- Implemented generic algorithms (count_self_loops, sum_edge_values) that work with ANY edge type
771-
- Verified all edge types work: pairs, tuples, edge_info, edge_list::edge_descriptor
771+
- Verified all edge types work: pairs, tuples, edge_data, edge_list::edge_descriptor
772772
- Tested string vertex IDs (non-integral types)
773773
- Verified multiple edge types can coexist in same compilation unit
774774
- All 32 assertions passing

0 commit comments

Comments
 (0)