pub struct IndexConfig {
pub dim: usize,
pub num_hashes: usize,
pub num_tables: usize,
pub num_probes: usize,
pub distance_metric: DistanceMetric,
pub normalize_vectors: bool,
pub seed: Option<u64>,
}Expand description
Configuration for the LSH index.
Fields§
§dim: usizeDimensionality of vectors.
num_hashes: usizeNumber of hash bits per table (1..=64).
num_tables: usizeNumber of independent hash tables.
num_probes: usizeNumber of extra buckets to probe per table during queries.
distance_metric: DistanceMetricDistance metric for ranking candidates.
normalize_vectors: boolWhether to L2-normalize vectors on insertion (recommended for cosine).
seed: Option<u64>Optional RNG seed for reproducible projections.
Trait Implementations§
Source§impl Clone for IndexConfig
impl Clone for IndexConfig
Source§fn clone(&self) -> IndexConfig
fn clone(&self) -> IndexConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IndexConfig
impl Debug for IndexConfig
Auto Trait Implementations§
impl Freeze for IndexConfig
impl RefUnwindSafe for IndexConfig
impl Send for IndexConfig
impl Sync for IndexConfig
impl Unpin for IndexConfig
impl UnsafeUnpin for IndexConfig
impl UnwindSafe for IndexConfig
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