pub trait QuantizedVector: Send + Sync {
// Required methods
fn quantize(vector: &[f32]) -> Self;
fn distance(&self, other: &Self) -> f32;
fn reconstruct(&self) -> Vec<f32>;
}Expand description
Trait for quantized vector representations
Required Methods§
Sourcefn reconstruct(&self) -> Vec<f32>
fn reconstruct(&self) -> Vec<f32>
Reconstruct approximate full-precision vector
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.