pub struct NoQuantizer<D: DistanceMetric> {
metric: D,
}Expand description
Identity quantizer — no acceleration, exact distances only.
This is the default. Codes are zero-sized (no storage overhead).
All distance computations use the underlying DistanceMetric.
Fields§
§metric: DImplementations§
Source§impl<D: DistanceMetric> NoQuantizer<D>
impl<D: DistanceMetric> NoQuantizer<D>
Trait Implementations§
Source§impl<D: Clone + DistanceMetric> Clone for NoQuantizer<D>
impl<D: Clone + DistanceMetric> Clone for NoQuantizer<D>
Source§fn clone(&self) -> NoQuantizer<D>
fn clone(&self) -> NoQuantizer<D>
Returns a copy 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 moreSource§impl<D: DistanceMetric> Quantizer for NoQuantizer<D>
impl<D: DistanceMetric> Quantizer for NoQuantizer<D>
Source§fn encode(&self, _vector: &[f32]) -> Self::Code
fn encode(&self, _vector: &[f32]) -> Self::Code
Encode a full-precision vector into a compact code. Read more
Source§fn distance_approx(&self, _a: &Self::Code, _b: &Self::Code) -> f32
fn distance_approx(&self, _a: &Self::Code, _b: &Self::Code) -> f32
Fast approximate distance between two codes. Read more
Source§fn distance_exact(&self, a: &[f32], b: &[f32]) -> f32
fn distance_exact(&self, a: &[f32], b: &[f32]) -> f32
Exact distance between full-precision vectors. Read more
Source§fn is_accelerated(&self) -> bool
fn is_accelerated(&self) -> bool
Whether this quantizer provides actual acceleration. Read more
Source§fn needs_training(&self) -> bool
fn needs_training(&self) -> bool
Whether this quantizer needs training on a data sample before use. Read more
Auto Trait Implementations§
impl<D> Freeze for NoQuantizer<D>where
D: Freeze,
impl<D> RefUnwindSafe for NoQuantizer<D>where
D: RefUnwindSafe,
impl<D> Send for NoQuantizer<D>
impl<D> Sync for NoQuantizer<D>
impl<D> Unpin for NoQuantizer<D>where
D: Unpin,
impl<D> UnwindSafe for NoQuantizer<D>where
D: 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