#[repr(C)]pub struct QueryMeta {
pub inner_product_correction: f32,
pub bit_sum: f32,
pub offset: f32,
pub metric_specific: f32,
}Expand description
Scalar quantization correction factors for computing distances between scalar quantized queries and spherically quantized data elements.
Computing the distance between a query and a data vector uses the same forumla derived in the module level documentation.
The one difference is that the query must explicitly carry the “offset” term as it cannot be derived from the number of bits used for the compression.
Fields§
§inner_product_correction: f32The value with which to scale the bit-level inner product with the 1-bit data data vectors.
bit_sum: f32Scaling factor for the DataMeta::twice_contraction. Applied separately to
still allow 1-bit vectors using DataMeta to compute distances with eachother
efficiently.
offset: f32The query-specific offset, taking into account the scaling factor for the query as well as its minimum value. See the struct-level documentation for an explanation.
metric_specific: f32The corresponding metric specific term as DataMeta.
Trait Implementations§
impl Copy for QueryMeta
impl Pod for QueryMeta
impl StructuralPartialEq for QueryMeta
Auto Trait Implementations§
impl Freeze for QueryMeta
impl RefUnwindSafe for QueryMeta
impl Send for QueryMeta
impl Sync for QueryMeta
impl Unpin for QueryMeta
impl UnwindSafe for QueryMeta
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
Source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
bits
as &Self.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>
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>
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