Conversation
…ative-weight check - Add stale-pop skip to ensure on_examine_vertex/on_finish_vertex fire exactly once per vertex, matching BGL visitor semantics so user-supplied Compare is used consistently (matches BGL) - Replace is_signed_v + '<' negative-weight guard with compare(w, zero) so any user-defined ordering is respected (matches BGL) - Remove spurious logic_error when an edge to an undiscovered vertex is not relaxed; this assumption breaks with custom Compare/Combine that saturate at the infinity sentinel - Update the stale-entry comment to reflect corrected semantics - Add note near priority_queue pointing to indexed_dary_heap_plan.md - Update test: 'infinite weight edge triggers logic_error' is now 'infinite weight edge leaves vertex unreachable' (no throw expected) - Add agents/indexed_dary_heap_plan.md: phased plan for replacing std::priority_queue with an indexed d-ary heap (decrease-key)
…ht types The runtime compare(w, zero) check is compiled out entirely when weight_type is an unsigned integral type, since no such value can be negative. For all other types (signed, floating-point, user-defined) the comparator-based check still runs, preserving correctness.
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.
…ative-weight check