Don't use heuristic selection for test
This commit is contained in:
parent
c1e5acf35c
commit
d265ef7c29
11
tests/all.rs
11
tests/all.rs
|
@ -4,7 +4,7 @@ use ordered_float::OrderedFloat;
|
||||||
use rand::rngs::{StdRng, ThreadRng};
|
use rand::rngs::{StdRng, ThreadRng};
|
||||||
use rand::{Rng, SeedableRng};
|
use rand::{Rng, SeedableRng};
|
||||||
|
|
||||||
use instant_distance::{Heuristic, Hnsw, Point as _, PointId, Search};
|
use instant_distance::{Hnsw, Point as _, PointId, Search};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn basic() {
|
fn basic() {
|
||||||
|
@ -46,14 +46,7 @@ fn randomized() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let (hnsw, pids) = Hnsw::<Point>::builder()
|
let (hnsw, pids) = Hnsw::<Point>::builder().seed(seed).build(&points);
|
||||||
.seed(seed)
|
|
||||||
.select_heuristic(Heuristic {
|
|
||||||
extend_candidates: false,
|
|
||||||
keep_pruned: true,
|
|
||||||
})
|
|
||||||
.build(&points);
|
|
||||||
|
|
||||||
let mut search = Search::default();
|
let mut search = Search::default();
|
||||||
let mut results = vec![PointId::default(); 100];
|
let mut results = vec![PointId::default(); 100];
|
||||||
let found = hnsw.search(&query, &mut results, &mut search);
|
let found = hnsw.search(&query, &mut results, &mut search);
|
||||||
|
|
Loading…
Reference in New Issue