pub struct PGMIndex<K: Key> {
pub epsilon: usize,
pub data: Arc<Vec<K>>,
/* private fields */
}
Fields§
§epsilon: usize
§data: Arc<Vec<K>>
Implementations§
Source§impl<K: Key> PGMIndex<K>
impl<K: Key> PGMIndex<K>
pub fn new(data: Vec<K>, epsilon: usize) -> Self
pub fn stats(&self) -> PGMStats
pub fn segment_count(&self) -> usize
pub fn avg_segment_size(&self) -> f64
pub fn memory_usage(&self) -> usize
pub fn get(&self, key: K) -> Option<usize>
Sourcepub fn get_many_parallel(&self, keys: &[K]) -> Vec<Option<usize>>where
K: Sync,
pub fn get_many_parallel(&self, keys: &[K]) -> Vec<Option<usize>>where
K: Sync,
Parallel batch lookup: returns positions for each key (None if absent).
Sourcepub fn count_hits_parallel(&self, keys: &[K]) -> usizewhere
K: Sync,
pub fn count_hits_parallel(&self, keys: &[K]) -> usizewhere
K: Sync,
Parallel batch hit count (useful for throughput microbenchmarks).
Trait Implementations§
Auto Trait Implementations§
impl<K> Freeze for PGMIndex<K>
impl<K> RefUnwindSafe for PGMIndex<K>where
K: RefUnwindSafe,
impl<K> Send for PGMIndex<K>
impl<K> Sync for PGMIndex<K>
impl<K> Unpin for PGMIndex<K>where
K: Unpin,
impl<K> UnwindSafe for PGMIndex<K>where
K: RefUnwindSafe + 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> 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