pub struct PQConfig {
pub num_subspaces: usize,
pub num_centroids: usize,
pub kmeans_iterations: usize,
pub training_sample_size: usize,
}Expand description
Configuration for Product Quantization
Fields§
§num_subspaces: usizeNumber of subspaces (M). Vector is divided into M segments. Typical values: 4, 8, 16, 32
num_centroids: usizeNumber of centroids per subspace (K). Typically 256 (fits in u8).
kmeans_iterations: usizeNumber of k-means iterations for training
training_sample_size: usizeSample size for training (if 0, use all vectors)
Trait Implementations§
impl Copy for PQConfig
Auto Trait Implementations§
impl Freeze for PQConfig
impl RefUnwindSafe for PQConfig
impl Send for PQConfig
impl Sync for PQConfig
impl Unpin for PQConfig
impl UnwindSafe for PQConfig
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