fix: use consistent endpoint access in GraphCompressor#83
Open
sauravbhattacharya001 wants to merge 1 commit intomasterfrom
Open
fix: use consistent endpoint access in GraphCompressor#83sauravbhattacharya001 wants to merge 1 commit intomasterfrom
sauravbhattacharya001 wants to merge 1 commit intomasterfrom
Conversation
…ressor The buildQuotientGraph method used graph.getEndpoints(e).getFirst/Second() which depends on JUNG's Pair ordering and may not match the edge's stored vertex1/vertex2 fields. All other code in the project consistently uses e.getVertex1() and e.getVertex2() for endpoint access. This ensures consistent endpoint ordering when building the quotient graph, preventing potential mismatches in supernode assignment during compression.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
What
\�uildQuotientGraph\ in \GraphCompressor\ used \graph.getEndpoints(e).getFirst/Second()\ to get edge endpoints, while every other file in the project uses \�.getVertex1()\ / \�.getVertex2().
Why
JUNG's \getEndpoints()\ returns a \Pair\ whose ordering is not guaranteed to match the edge's stored \�ertex1/\�ertex2\ fields. This could cause incorrect supernode assignments during graph compression if the ordering differs.
Fix
Switched to \�.getVertex1()\ / \�.getVertex2()\ for consistency with the rest of the codebase.