pub struct QuantizedVector { /* private fields */ }Expand description
A quantized database-side sketch.
The codes are bit-packed and can be scored asymmetrically against a
QuerySketch.
Implementations§
Source§impl QuantizedVector
impl QuantizedVector
Sourcepub fn sketch_dim(&self) -> usize
pub fn sketch_dim(&self) -> usize
Returns the number of sketch coordinates.
Sourcepub fn packed_bytes(&self) -> &[u8] ⓘ
pub fn packed_bytes(&self) -> &[u8] ⓘ
Returns the packed bytes that store the quantized sketch.
Sourcepub fn encoded_norm(&self) -> Option<u16>
pub fn encoded_norm(&self) -> Option<u16>
Returns the optional encoded norm channel.
Sourcepub fn storage_bytes(&self) -> usize
pub fn storage_bytes(&self) -> usize
Returns the total number of bytes used by this code.
Trait Implementations§
Source§impl Clone for QuantizedVector
impl Clone for QuantizedVector
Source§fn clone(&self) -> QuantizedVector
fn clone(&self) -> QuantizedVector
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for QuantizedVector
impl Debug for QuantizedVector
Source§impl PartialEq for QuantizedVector
impl PartialEq for QuantizedVector
Source§fn eq(&self, other: &QuantizedVector) -> bool
fn eq(&self, other: &QuantizedVector) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for QuantizedVector
Auto Trait Implementations§
impl Freeze for QuantizedVector
impl RefUnwindSafe for QuantizedVector
impl Send for QuantizedVector
impl Sync for QuantizedVector
impl Unpin for QuantizedVector
impl UnsafeUnpin for QuantizedVector
impl UnwindSafe for QuantizedVector
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