https://github.com/enricobolzonello/clann
Clustered LSH-based Algorithm for the Nearest Neighbors problem
https://github.com/enricobolzonello/clann
lsh nearest-neighbor-search
Last synced: 8 months ago
JSON representation
Clustered LSH-based Algorithm for the Nearest Neighbors problem
- Host: GitHub
- URL: https://github.com/enricobolzonello/clann
- Owner: enricobolzonello
- Created: 2025-01-02T16:13:02.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-02-18T16:54:00.000Z (8 months ago)
- Last Synced: 2025-02-18T17:47:32.801Z (8 months ago)
- Topics: lsh, nearest-neighbor-search
- Language: Rust
- Homepage:
- Size: 1.3 MB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
CLANN
CLANN: Clustered LSH-based Algorithm for the Nearest Neighbors problem
## Prerequisites
The algorithm is built on top of PUFFINN, which was built on C++. To achieve Rust integration, [bindgen](https://docs.rs/bindgen/latest/bindgen/) has been used, which, provided a C/C++ header file, receives Rust FFI code to call into C/C++ functions and use types defined in the header. But generating directly C++ binds is quite tricky since [not all features are supported](https://rust-lang.github.io/rust-bindgen/cpp.html), instead what has been done is a minimal C wrapper around the basic functions to then generate the bindings. To do this, some prerequisites are needed, namily:
- Clang 9.0 or greater
- A valid OpenMP installation, what worked for me is to install the development package, even though a OpenMP installation for GCC already exists:
`sudo apt install libomp-dev `
At this point, all you need to do is do `cargo build` and it should automatically compile.Alternatively, an easier way is to use [NixOS](https://nixos.org/). If Nix is installed, just run the command:
```
nix develop
```
and then a `cargo build`.