pub struct Bits1Query {
pub norm_sq: f32,
/* private fields */
}Expand description
A query prepared for popcount scoring against 1-bit codes.
Fields§
§norm_sq: f32Exact ‖q‖².
Implementations§
Source§impl Bits1Query
impl Bits1Query
Sourcepub fn new(rotated: &[f32]) -> Result<Self, TurboQuantError>
pub fn new(rotated: &[f32]) -> Result<Self, TurboQuantError>
Build from the rotated f32 query (same input the Turbo4 query prep
uses; qscale/norm_sq semantics identical to encode_query).
Sourcepub fn distance_to(&self, metric: Metric, blob: &[u8]) -> f32
pub fn distance_to(&self, metric: Metric, blob: &[u8]) -> f32
Estimated distance to a 1-bit code blob under metric. Pure
AND+POPCNT per plane; conventions match the Turbo4 scorers.
Auto Trait Implementations§
impl Freeze for Bits1Query
impl RefUnwindSafe for Bits1Query
impl Send for Bits1Query
impl Sync for Bits1Query
impl Unpin for Bits1Query
impl UnsafeUnpin for Bits1Query
impl UnwindSafe for Bits1Query
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