Struct flechasdb::partitions::Partitions
source · pub struct Partitions<T, VS> {
pub codebook: Codebook<T>,
pub residues: VS,
}Expand description
Partitions.
Moves the input vector set to save memory.
Fields§
§codebook: Codebook<T>Codebook of the partition.
residues: VSResidue vector set.
Implementations§
source§impl<T, VS> Partitions<T, VS>where
T: Scalar,
VS: VectorSet<T>,
impl<T, VS> Partitions<T, VS>where T: Scalar, VS: VectorSet<T>,
sourcepub fn num_partitions(&self) -> usize
pub fn num_partitions(&self) -> usize
Returns the number of partitions.
sourcepub fn all_vectors(&self) -> AllVectorIterator<'_, T, VS> ⓘ
pub fn all_vectors(&self) -> AllVectorIterator<'_, T, VS> ⓘ
Returns an iterator of all the input vectors.
Iteration may be expensive because it reconstructs an input vector
every next call.
Auto Trait Implementations§
impl<T, VS> RefUnwindSafe for Partitions<T, VS>where T: RefUnwindSafe, VS: RefUnwindSafe,
impl<T, VS> Send for Partitions<T, VS>where T: Send, VS: Send,
impl<T, VS> Sync for Partitions<T, VS>where T: Sync, VS: Sync,
impl<T, VS> Unpin for Partitions<T, VS>where T: Unpin, VS: Unpin,
impl<T, VS> UnwindSafe for Partitions<T, VS>where T: UnwindSafe, VS: 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