Skip to content

uzushino/voyager-rs

Repository files navigation

voyager-rs

spotify/voyager bindings for Rust.

[dependencies]
voyager_rs = { git = "https://github.com/uzushino/voyager_rs" }

Building

$ git clone [email protected]:uzushino/voyager-rs.git
$ cd voyager-rs
$ git submodule update
$ cargo test

Example

let v = Voyager::new();

let v1 = [1.0, 2.0, 3.0, 4.0, 5.0];
let v2 = [6.0, 7.0, 8.0, 9.0, 10.0];

v.add_item(v1, Some(1));
v.add_item(v2, Some(2));

let (result, distance) = v.query(v1, 2, None);

assert!(result == vec![1, 2]);
assert!(distance == vec![0.0, 125.0]);

mnist

$ cargo run --example mnist

Feature

  • add_item
  • get_distance
  • query
  • save_index
  • load_index

About

spotify/voyager bindings for Rust.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published