Implement fastpair (#142)

* initial fastpair implementation
* FastPair initial implementation
* implement fastpair
* Add random test
* Add bench for fastpair
* Refactor with constructor for FastPair
* Add serialization for PairwiseDistance
* Add fp_bench feature for fastpair bench
This commit is contained in:
Lorenzo
2022-08-23 16:56:21 +01:00
committed by GitHub
parent d905ebea15
commit a1c56a859e
5 changed files with 669 additions and 0 deletions
+7
View File
@@ -17,6 +17,7 @@ default = ["datasets"]
ndarray-bindings = ["ndarray"]
nalgebra-bindings = ["nalgebra"]
datasets = []
fp_bench = []
[dependencies]
ndarray = { version = "0.15", optional = true }
@@ -26,6 +27,7 @@ num = "0.4"
rand = "0.8"
rand_distr = "0.4"
serde = { version = "1", features = ["derive"], optional = true }
itertools = "0.10.3"
[target.'cfg(target_arch = "wasm32")'.dependencies]
getrandom = { version = "0.2", features = ["js"] }
@@ -46,3 +48,8 @@ harness = false
name = "naive_bayes"
harness = false
required-features = ["ndarray-bindings", "nalgebra-bindings"]
[[bench]]
name = "fastpair"
harness = false
required-features = ["fp_bench"]