-
Notifications
You must be signed in to change notification settings - Fork 12
Open
0 / 20 of 2 issues completedLabels
enhancementNew feature or requestNew feature or request
Description
Summary
Two related problems with the current iteration interface:
1. All iteration methods return std::vector by value (P1)
vertices(), edges(), faces(), vertices_interior(), vertices_boundary(), wheel(), boundaries(), outgoing_edges(), and connected_components() all allocate and return a new std::vector on every call. The ABF/ABFPlusPlus solvers call these in tight per-iteration loops, causing O(n) heap allocations per solver step.
2. FacePtr iteration requires *face dereference (A2)
Range-based iteration over a face pointer requires for (const auto& e : *face) rather than for (const auto& e : face->edges()).
Proposed Fix
Replace vector-returning methods with lazy range views:
std::span(or similar) for contiguous storage (vertices,edges,faces)- Custom iterator/sentinel for linked-list traversals (
wheel,outgoing_edges,boundaries, face edges)
Add face->edges() as a named iterable accessor.
Acceptance Criteria
- Hot-path iteration does not heap-allocate on every call
face->edges()works in range-based for loopsfor (const auto& e : *face)continues to work (no breaking change)- All existing tests pass
Conductor Tracks
Migrated from GitLab issue #3
Reactions are currently unavailable
Sub-issues
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request