pub struct VectorCandidate<I> { /* private fields */ }Expand description
One ranked vector candidate. Squared-L2 is lower-is-better.
Implementations§
Source§impl<I> VectorCandidate<I>
impl<I> VectorCandidate<I>
Sourcepub const fn exact(id: I, squared_l2: f64) -> Self
pub const fn exact(id: I, squared_l2: f64) -> Self
Constructs a candidate whose squared-L2 was computed exactly.
Sourcepub const fn estimated(id: I, score: f64) -> Self
pub const fn estimated(id: I, score: f64) -> Self
Constructs an estimated candidate so the fusion guard can reject it.
Sourcepub const fn squared_l2(&self) -> f64
pub const fn squared_l2(&self) -> f64
Returns exact squared-L2 when Self::precision is exact.
Sourcepub const fn precision(&self) -> ScorePrecision
pub const fn precision(&self) -> ScorePrecision
Returns the score provenance checked by fusion.
Trait Implementations§
Source§impl<I: Clone> Clone for VectorCandidate<I>
impl<I: Clone> Clone for VectorCandidate<I>
Source§impl<I: Debug> Debug for VectorCandidate<I>
impl<I: Debug> Debug for VectorCandidate<I>
Source§impl<I: PartialEq> PartialEq for VectorCandidate<I>
impl<I: PartialEq> PartialEq for VectorCandidate<I>
impl<I: PartialEq> StructuralPartialEq for VectorCandidate<I>
Auto Trait Implementations§
impl<I> Freeze for VectorCandidate<I>where
I: Freeze,
impl<I> RefUnwindSafe for VectorCandidate<I>where
I: RefUnwindSafe,
impl<I> Send for VectorCandidate<I>where
I: Send,
impl<I> Sync for VectorCandidate<I>where
I: Sync,
impl<I> Unpin for VectorCandidate<I>where
I: Unpin,
impl<I> UnsafeUnpin for VectorCandidate<I>where
I: UnsafeUnpin,
impl<I> UnwindSafe for VectorCandidate<I>where
I: UnwindSafe,
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