Add helper method for bindings

This commit is contained in:
Dirkjan Ochtman 2021-03-16 15:31:27 +01:00
parent afda7a0831
commit 349582b5b1
1 changed files with 13 additions and 0 deletions

View File

@ -77,6 +77,19 @@ impl Builder {
pub fn build<P: Point>(self, points: &[P]) -> (Hnsw<P>, Vec<PointId>) {
Hnsw::new(points, self)
}
#[doc(hidden)]
pub fn into_parts(self) -> (usize, usize, f32, u64) {
let Self {
ef_search,
ef_construction,
heuristic: _,
ml,
seed,
..
} = self;
(ef_search, ef_construction, ml, seed)
}
}
impl Default for Builder {