pub struct InMemoryVamana<T: Scalar + Send + Sync> { /* private fields */ }Implementations§
Source§impl<T: Scalar + Send + Sync> InMemoryVamana<T>
impl<T: Scalar + Send + Sync> InMemoryVamana<T>
pub fn new( adj_list: DashMap<Id, Vec<Id>>, id_to_point: DashMap<Id, Array1<T>>, ) -> Self
Sourcepub fn graph(&self) -> &DashMap<Id, Vec<Id>>
pub fn graph(&self) -> &DashMap<Id, Vec<Id>>
This can be useful for serializing to disk. Usually the points are already stored elsewhere, so serializing the graph alone can save space. To deserialize, collect the points, deserialize this graph, and use InMemoryVamana::new. This can also be used to introspect the graph, e.g. for debugging, analysis, or research.
pub fn init_random_index( dataset: Vec<(Id, Array1<T>)>, metric: Metric<T>, params: VamanaParams, medoid_sample_size: usize, ) -> Vamana<T, Self>
pub fn build_index( dataset: Vec<(Id, Array1<T>)>, metric: Metric<T>, params: VamanaParams, medoid_sample_size: usize, ) -> Vamana<T, Self>
Trait Implementations§
Source§impl<T: Clone + Scalar + Send + Sync> Clone for InMemoryVamana<T>
impl<T: Clone + Scalar + Send + Sync> Clone for InMemoryVamana<T>
Source§fn clone(&self) -> InMemoryVamana<T>
fn clone(&self) -> InMemoryVamana<T>
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<T: Default + Scalar + Send + Sync> Default for InMemoryVamana<T>
impl<T: Default + Scalar + Send + Sync> Default for InMemoryVamana<T>
Source§fn default() -> InMemoryVamana<T>
fn default() -> InMemoryVamana<T>
Returns the “default value” for a type. Read more
Source§impl<T: Scalar + Send + Sync> GreedySearchable<T> for InMemoryVamana<T>
impl<T: Scalar + Send + Sync> GreedySearchable<T> for InMemoryVamana<T>
Auto Trait Implementations§
impl<T> Freeze for InMemoryVamana<T>
impl<T> !RefUnwindSafe for InMemoryVamana<T>
impl<T> Send for InMemoryVamana<T>
impl<T> Sync for InMemoryVamana<T>
impl<T> Unpin for InMemoryVamana<T>
impl<T> UnwindSafe for InMemoryVamana<T>where
T: RefUnwindSafe,
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> 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