pub struct MultiIndex<K: Send + Sync> { /* private fields */ }Implementations§
Source§impl<K: Clone + Eq + Hash + Debug + Send + Sync> MultiIndex<K>
impl<K: Clone + Eq + Hash + Debug + Send + Sync> MultiIndex<K>
pub fn new<R: Rng + Sized>( dimension: usize, index_count: u8, hyperplane_count: u8, rng: &mut R, ) -> MultiIndex<K>
Sourcepub fn autotune_planes<R: Rng + Sized>(
dimension: usize,
group_size: f32,
vectors: &Vec<Vec<f32>>,
rng: &mut R,
) -> u8
pub fn autotune_planes<R: Rng + Sized>( dimension: usize, group_size: f32, vectors: &Vec<Vec<f32>>, rng: &mut R, ) -> u8
Given a set of vectors, discover the best index count and plane count to use to achieve a particular group size
pub fn nearest<F>( &self, point: &Vec<f32>, count: usize, get_dist: F, ) -> Vec<DistanceNode<K>>
pub fn nearest_points(&self, point: &Vec<f32>) -> Vec<K>
pub fn add(&mut self, key: K, vector: &Vec<f32>)
pub fn dimensions(&self) -> usize
pub fn planes_len(&self) -> usize
pub fn indices_len(&self) -> usize
Auto Trait Implementations§
impl<K> Freeze for MultiIndex<K>
impl<K> RefUnwindSafe for MultiIndex<K>where
K: RefUnwindSafe,
impl<K> Send for MultiIndex<K>
impl<K> Sync for MultiIndex<K>
impl<K> Unpin for MultiIndex<K>where
K: Unpin,
impl<K> UnwindSafe for MultiIndex<K>where
K: UnwindSafe,
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> 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