Skip to content

Short path refine#14

Merged
pratzl merged 2 commits intomainfrom
short_path_refine
Mar 14, 2026
Merged

Short path refine#14
pratzl merged 2 commits intomainfrom
short_path_refine

Conversation

@pratzl
Copy link
Collaborator

@pratzl pratzl commented Mar 14, 2026

Refine dijkstra & bellman-ford shortests paths

pratzl added 2 commits March 14, 2026 16:39
…target

- Add graph_type alias to replace repeated std::remove_reference_t<G>
- Move weight evaluation and negative weight check into relax_target
  (2-arg signature instead of 3-arg; weight captured by reference)
- Use views::incidence(g, u) without weight projection
- Unify source vertex validation (remove index_vertex_range branch)
- Cache find_vertex results in local variables to avoid redundant lookups
- Fix on_finish_vertex to use else-if for vertex vs vertex_id visitors
- Move zero/infinite constants before relax_target for use in neg check
- Add graph_type alias to replace repeated std::remove_reference_t<G>
- Unify source vertex validation (remove index_vertex_range branch)
- Consistent formatting: aligned template params, weight lambda style
- Rename loop variable w -> uv_w for clarity
- Move N initialization closer to first use
- Cache find_vertex result in seed_it to avoid redundant lookups
@pratzl pratzl merged commit 9bcd09a into main Mar 14, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant