Skip to content

Add unit tests for NeighborArray#addAndEnsureDiversity - #16901

Open
leng25 wants to merge 3 commits into
apache:mainfrom
leng25:test-neighbor-array-add-and-ensure-diversity
Open

leng25 wants to merge 3 commits into
apache:mainfrom
leng25:test-neighbor-array-add-and-ensure-diversity

Conversation

@leng25

@leng25 leng25 commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

NeighborArray#addAndEnsureDiversity is currently only tested indirectly through HnswGraphTestCase.
This PR adds direct unit tests in TestNeighborArray

Tests use a small 2D scorer (similarity = 1 − L1 distance) to keep vector arithmetic easy to verify by hand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant