pub struct LshConfig {
pub num_tables: usize,
pub num_bits: usize,
pub num_probes: usize,
pub seed: u64,
}Expand description
LSH configuration
Fields§
§num_tables: usizeNumber of hash tables (more tables = better recall, more memory)
num_bits: usizeNumber of bits per hash (hash length)
num_probes: usizeNumber of probes (how many nearby buckets to check)
seed: u64Random seed for reproducibility
Implementations§
Source§impl LshConfig
impl LshConfig
Sourcepub fn high_recall() -> Self
pub fn high_recall() -> Self
Create config optimized for high recall
Sourcepub fn memory_efficient() -> Self
pub fn memory_efficient() -> Self
Create config optimized for memory efficiency
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LshConfig
impl<'de> Deserialize<'de> for LshConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for LshConfig
impl RefUnwindSafe for LshConfig
impl Send for LshConfig
impl Sync for LshConfig
impl Unpin for LshConfig
impl UnwindSafe for LshConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more