Skip to content

fix: use consistent endpoint access in GraphCompressor#83

Open
sauravbhattacharya001 wants to merge 1 commit intomasterfrom
fix/compressor-endpoint-consistency
Open

fix: use consistent endpoint access in GraphCompressor#83
sauravbhattacharya001 wants to merge 1 commit intomasterfrom
fix/compressor-endpoint-consistency

Conversation

@sauravbhattacharya001
Copy link
Owner

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.

…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.
@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@github-actions github-actions bot added visualization Graph visualization and UI size/xs labels Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/xs visualization Graph visualization and UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant