go-covertree
is a cover tree implementation in Go for nearest-neighbour search and clustering. It uses an extensible backing store interface (suitable to adapting to key-value stores, RDBMSes, etc) to support very large data sets.
For further horizontal scaling, a partitioned store implementation supports sharding across multiple underlying stores using a partitioning function.
See the API documentation for more details.
This software is made available under an MIT license.
Tree instances are thread-safe for readonly access.
Insertions into the tree (using Insert
) are purely append-only operations, and safe to make concurrently, allowing tree construction to be parallelised.
Searching the tree (using FindNearest
) is purely a read-only operation and safe to do concurrently, including with insertions.
Removals from the tree (using Remove
) are not thread-safe and should be externally synchronised if concurrent read-write access is required.
Store implementations should observe their own thread-safety considerations.