Struct instant_distance::Builder
source · pub struct Builder { /* private fields */ }
Expand description
Parameters for building the Hnsw
Implementations§
source§impl Builder
impl Builder
sourcepub fn ef_construction(self, ef_construction: usize) -> Self
pub fn ef_construction(self, ef_construction: usize) -> Self
Set the efConstruction
parameter from the paper
sourcepub fn ef_search(self, ef: usize) -> Self
pub fn ef_search(self, ef: usize) -> Self
Set the ef
parameter from the paper
If the efConstruction
parameter is not already set, it will be set
to the same value as ef
by default.
pub fn select_heuristic(self, params: Option<Heuristic>) -> Self
sourcepub fn ml(self, ml: f32) -> Self
pub fn ml(self, ml: f32) -> Self
Set the mL
parameter from the paper
If the mL
parameter is not already set, it defaults to 1.0 / ln(M)
.
sourcepub fn seed(self, seed: u64) -> Self
pub fn seed(self, seed: u64) -> Self
Set the seed value for the random number generator used to generate a layer for each point
If this value is left unset, a seed is generated from entropy (via getrandom()
).
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more