pub enum BuildQuantizer {
NoQuant(NoStore),
Scalar1Bit(WithBits<1>),
PQ(FixedChunkPQTable),
}Expand description
Quantizer types used specifically for async disk index building.
Variants§
Implementations§
Source§impl BuildQuantizer
impl BuildQuantizer
Sourcepub fn train<Data, StorageProvider>(
build_quantization_type: &QuantizationType,
index_path_prefix: &str,
index_configuration: &IndexConfiguration,
pq_storage: &PQStorage,
storage_provider: &StorageProvider,
) -> ANNResult<Self>where
Data: GraphDataType<VectorIdType = u32>,
StorageProvider: StorageReadProvider + StorageWriteProvider,
pub fn train<Data, StorageProvider>(
build_quantization_type: &QuantizationType,
index_path_prefix: &str,
index_configuration: &IndexConfiguration,
pq_storage: &PQStorage,
storage_provider: &StorageProvider,
) -> ANNResult<Self>where
Data: GraphDataType<VectorIdType = u32>,
StorageProvider: StorageReadProvider + StorageWriteProvider,
Train a new quantizer from scratch.
Sourcepub fn load<StorageProvider>(
build_quantization_type: &QuantizationType,
index_path_prefix: &str,
storage_provider: &StorageProvider,
) -> ANNResult<Self>where
StorageProvider: StorageReadProvider,
pub fn load<StorageProvider>(
build_quantization_type: &QuantizationType,
index_path_prefix: &str,
storage_provider: &StorageProvider,
) -> ANNResult<Self>where
StorageProvider: StorageReadProvider,
Load a previously trained quantizer from storage.
Trait Implementations§
Source§impl Clone for BuildQuantizer
impl Clone for BuildQuantizer
Source§fn clone(&self) -> BuildQuantizer
fn clone(&self) -> BuildQuantizer
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 moreAuto Trait Implementations§
impl Freeze for BuildQuantizer
impl RefUnwindSafe for BuildQuantizer
impl Send for BuildQuantizer
impl Sync for BuildQuantizer
impl Unpin for BuildQuantizer
impl UnsafeUnpin for BuildQuantizer
impl UnwindSafe for BuildQuantizer
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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