pub struct DiskQuery<'a> {
pub query: &'a [f32],
pub d_max: f32,
}Expand description
A disk query: find all vectors whose Euclidean distance to query
is at most d_max (i.e. the full disk/ball of radius d_max).
This is equivalent to a RangeQuery with d_min = 0.
Fields§
§query: &'a [f32]The query vector. Must have length equal to RingDb::dims().
d_max: f32Radius of the disk (inclusive upper bound on distance). Must be ≥ 0.
Auto Trait Implementations§
impl<'a> Freeze for DiskQuery<'a>
impl<'a> RefUnwindSafe for DiskQuery<'a>
impl<'a> Send for DiskQuery<'a>
impl<'a> Sync for DiskQuery<'a>
impl<'a> Unpin for DiskQuery<'a>
impl<'a> UnsafeUnpin for DiskQuery<'a>
impl<'a> UnwindSafe for DiskQuery<'a>
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