Merged
Conversation
…predecessor parameters - Replace container-based distances[uid]/predecessor[uid] params with function-based distance(g, uid) and predecessor(g, uid) across dijkstra_shortest_paths, dijkstra_shortest_distances, bellman_ford_shortest_paths, bellman_ford_shortest_distances, and prim (via mst.hpp) - Add new concepts to traversal_common.hpp: distance_function_for, predecessor_function_for, distance_fn_value_t type alias - Add _null_predecessor_fn / _null_predecessor for skipping predecessor tracking without a null container, and is_null_predecessor_fn_v<T> trait - Add container_value_fn<Container> CTAD function object adaptor bridging containers to the new function API (wraps c[uid] into fn(g, uid) -> auto&) - Update all test call sites to use container_value_fn(distance) / container_value_fn(predecessor) - Remove is_arithmetic_v<distance_fn_value_t<DistanceFn, G>> from all requires clauses; basic_edge_weight_function already constrains the arithmetic relationship via assignable_from
- Rename shortest_path_infinite_distance() -> infinite_distance()
- Rename shortest_path_zero() -> zero_distance()
- Rename concepts to use 'fn' consistently:
distance_function_for -> distance_fn_for
predecessor_function_for -> predecessor_fn_for
vertex_property_function_for -> vertex_property_fn_for
- Remove unused vertex_id_store_t alias and its static_asserts
- Update infinite_distance()/zero_distance() in dijkstra and
bellman_ford docstrings and inline examples
- Update all docs (dijkstra.md, bellman_ford.md, mst.md,
connected_components.md, label_propagation.md) to match
- Update graph_cpo.hpp comment for raw_vertex_id_t
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace range with function parameters in algorithms for greater versatility.