pub struct PreparedQuery { /* private fields */ }Expand description
A query rotated into RaBitQ space, reusable across many candidate estimates.
Implementations§
Source§impl PreparedQuery
impl PreparedQuery
Sourcepub fn rq(&self) -> &[f32]
pub fn rq(&self) -> &[f32]
R·(q − c) — the rotated query residual, borrowed.
Exposed for callers that fold the estimator into their own SIMD kernel rather than
going through RaBitQuantizer::estimate_dist_sq — that method takes &RaBitCode,
which owns a Vec<u8>, so building one per candidate to call it would allocate on
every distance computation in a hot graph-traversal loop.
Auto Trait Implementations§
impl Freeze for PreparedQuery
impl RefUnwindSafe for PreparedQuery
impl Send for PreparedQuery
impl Sync for PreparedQuery
impl Unpin for PreparedQuery
impl UnsafeUnpin for PreparedQuery
impl UnwindSafe for PreparedQuery
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
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