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

Online insertion, removal of points #18

Open
zgornel opened this issue Jul 5, 2019 · 2 comments
Open

Online insertion, removal of points #18

zgornel opened this issue Jul 5, 2019 · 2 comments

Comments

@zgornel
Copy link
Contributor

zgornel commented Jul 5, 2019

Mostly refering to https://github.com/andrusha97/online-hnsw
Have no ideea of the costs involved but it may prove useful. The mechanism is probably mostly in place through insert_point! but it would be cool to have

# we assume to some `hnsw` object already defined with an index
# hnsw = HierarchicalNSW(...)
# add_to_graph!(hnsw)
push!(hnsw, point)  # point::AbstractVector
remove!(hnsw, index)  # index::Int
@JonasIsensee
Copy link
Member

This should be possible.
I opted out of doing this initially because for a fixed-size graph I can preallocate all the relevant arrays.
Also, at the moment the implementation does not modify nor copy the input dataset.
Instead it indexes into the data.

To push! a point into the graph one would need to push it into the data set.

Deleting is a bit more difficult. What do you do with the nodes that pointed towards the deleted nodes. (And how do you find them? I'm don't remember if we have only bidirectional links)

@zgornel
Copy link
Contributor Author

zgornel commented Oct 16, 2019

I do not know; deletion may be indeed complex and the structure (probably all nsw's) not designed for fast updates.

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

No branches or pull requests

2 participants