Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: hnsw #319

Merged
merged 5 commits into from
Jun 3, 2024
Merged

feat: hnsw #319

merged 5 commits into from
Jun 3, 2024

Conversation

friendlymatthew
Copy link
Collaborator

The first draft of Hnsw was messy, this PR refactors the existing code and adds tests that asserts the behavior more clearly.

Vector is a struct that contains a list of friends relative to that vector's position. Vector_test.go has a series of tests that checks the euclidian distance, correctly asserts the level, and links between two nodes

Copy link

github-actions bot commented May 30, 2024

pkg/hnsw/vector.go Outdated Show resolved Hide resolved
pkg/hnsw/vector.go Outdated Show resolved Hide resolved
pkg/hnsw/vector.go Outdated Show resolved Hide resolved
@friendlymatthew friendlymatthew merged commit 0de05c0 into main Jun 3, 2024
10 checks passed
@friendlymatthew friendlymatthew deleted the hnsw-2 branch June 4, 2024 19:24
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.

2 participants