pub struct MinMaxMaxSim<const B_BITS: usize>where
Unsigned: Representation<B_BITS>,{ /* private fields */ }Expand description
An owned MinMax query with a backend selected at construction.
Implementations§
Source§impl<const B_BITS: usize> MinMaxMaxSim<B_BITS>where
Unsigned: Representation<B_BITS>,
impl<const B_BITS: usize> MinMaxMaxSim<B_BITS>where
Unsigned: Representation<B_BITS>,
pub fn nrows(&self) -> usize
Sourcepub fn compute_max_sim(
&self,
document: MatRef<'_, MinMaxMeta<B_BITS>>,
scores: &mut [f32],
) -> Result<(), MaxSimError>
pub fn compute_max_sim( &self, document: MatRef<'_, MinMaxMeta<B_BITS>>, scores: &mut [f32], ) -> Result<(), MaxSimError>
Overwrite scores, ignoring NaN inner products. Empty documents and query rows with only NaN or negative-infinite inner products produce f32::MAX. Nonempty zero-dimensional documents produce zero.
§Errors
Returns an error for a wrong output length or document dimension, without modifying the output.
Trait Implementations§
Auto Trait Implementations§
impl<const B_BITS: usize> !RefUnwindSafe for MinMaxMaxSim<B_BITS>
impl<const B_BITS: usize> !UnwindSafe for MinMaxMaxSim<B_BITS>
impl<const B_BITS: usize> Forget for MinMaxMaxSim<B_BITS>
impl<const B_BITS: usize> Freeze for MinMaxMaxSim<B_BITS>
impl<const B_BITS: usize> Move for MinMaxMaxSim<B_BITS>
impl<const B_BITS: usize> Send for MinMaxMaxSim<B_BITS>
impl<const B_BITS: usize> Sync for MinMaxMaxSim<B_BITS>
impl<const B_BITS: usize> Unpin for MinMaxMaxSim<B_BITS>
impl<const B_BITS: usize> UnsafeUnpin for MinMaxMaxSim<B_BITS>where
Box<dyn MinMaxMaxSimKernel<B_BITS>>: UnsafeUnpin,
Blanket Implementations§
impl<T> AsyncFriendly for T
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> 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