Crates.io | ngt |
lib.rs | ngt |
version | 0.8.0 |
source | src |
created_at | 2020-05-09 22:17:25.881116 |
updated_at | 2024-05-18 11:45:15.018089 |
description | Rust wrappers for NGT nearest neighbor search. |
homepage | |
repository | https://github.com/lerouxrgd/ngt-rs |
max_upload_size | |
id | 239419 |
size | 125,949 |
Rust wrappers for NGT, which provides high-speed approximate nearest neighbor
searches against a large volume of data in high dimensional vector data space (several
ten to several thousand dimensions). The vector data can be f32
, u8
, or f16.
This crate provides the following indexes:
NgtIndex
: Graph and tree based index1QgIndex
: Quantized graph based index2QbgIndex
: Quantized blob graph based indexBoth quantized indexes are available through the quantized
Cargo feature. Note that
they rely on BLAS
and LAPACK
which thus have to be installed locally. Furthermore,
QgIndex
performances can be improved by using the qg_optim
Cargo
feature.
The NgtIndex
default implementation is an ANNG. It can be optimized3 or converted
to an ONNG through the optim
module.
By default ngt-rs
will be built dynamically, which requires CMake
to build NGT. This
means that you'll have to make the build artifact libngt.so
available to your final
binary (see an example in the CI). However the static
feature will build and
link NGT statically. Note that OpenMP
will also be linked statically. If the
quantized
feature is used, then BLAS
and LAPACK
libraries will also be linked
statically.
NGT's shared memory and large dataset features are
available through the Cargo features shared_mem
and large_data
respectively.