pub struct IndexConfig {
pub num_tables: usize,
pub bits_per_table: usize,
pub multiprobe: bool,
pub seed: u64,
}Expand description
Tuning for SaeCandidateIndex::build. All fields are explicit so the index
never reads global state; no CLI flags.
Fields§
§num_tables: usizeNumber of independent LSH tables. More tables → higher recall, more work.
bits_per_table: usizeRandom hyperplanes per table (signature bit-width). More bits → finer buckets (fewer collisions, lower recall per table).
multiprobe: boolWhether to also probe Hamming-distance-1 neighbouring buckets per table (multi-probe LSH). Cheap and a large recall win; kept on by default.
seed: u64Master seed for all hyperplane banks.
Implementations§
Source§impl IndexConfig
impl IndexConfig
Sourcepub fn auto(sketch_dim: usize, num_atoms: usize, seed: u64) -> Self
pub fn auto(sketch_dim: usize, num_atoms: usize, seed: u64) -> Self
A default configuration sized for a sketch of dimension sketch_dim and
roughly num_atoms atoms. Chooses bits_per_table ≈ log2(num_atoms)
(capped by the sketch dimension) so the expected bucket occupancy is a
small constant, and a handful of tables for recall — both grow only
logarithmically in num_atoms, keeping queries sublinear.
Trait Implementations§
Source§impl Clone for IndexConfig
impl Clone for IndexConfig
Source§fn clone(&self) -> IndexConfig
fn clone(&self) -> IndexConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy 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§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
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>
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>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.