pub struct Turbo4PlaneCodec { /* private fields */ }Expand description
VectorCodec adapter over ruvector_turboquant::Turbo4Codec — scores
on packed codes, never reconstructs (ADR-296).
Implementations§
Trait Implementations§
Source§impl VectorCodec for Turbo4PlaneCodec
impl VectorCodec for Turbo4PlaneCodec
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Bytes per encoded vector.
Source§fn encode(&self, v: &[f32]) -> Result<Vec<u8>>
fn encode(&self, v: &[f32]) -> Result<Vec<u8>>
Encode a vector. The blob is self-sufficient for scoring.
Source§fn decode(&self, blob: &[u8]) -> Result<Vec<f32>>
fn decode(&self, blob: &[u8]) -> Result<Vec<f32>>
Reconstruct an approximation (exact only for
Fp32).Source§fn distance(&self, a: &[u8], b: &[u8]) -> Result<f32>
fn distance(&self, a: &[u8], b: &[u8]) -> Result<f32>
Symmetric blob×blob distance under this codec’s metric.
Source§fn make_query(&self, q: &[f32]) -> Result<Box<dyn EncodedQuery>>
fn make_query(&self, q: &[f32]) -> Result<Box<dyn EncodedQuery>>
Prepare a query for repeated asymmetric scoring against blobs.
Auto Trait Implementations§
impl Freeze for Turbo4PlaneCodec
impl RefUnwindSafe for Turbo4PlaneCodec
impl Send for Turbo4PlaneCodec
impl Sync for Turbo4PlaneCodec
impl Unpin for Turbo4PlaneCodec
impl UnsafeUnpin for Turbo4PlaneCodec
impl UnwindSafe for Turbo4PlaneCodec
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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