pub struct SparseCachedNorm { /* private fields */ }Expand description
Pre-computed L2 norm for efficient repeated sparse cosine similarity calculations.
Implementations§
Source§impl SparseCachedNorm
impl SparseCachedNorm
Sourcepub const fn norm_squared(&self) -> f32
pub const fn norm_squared(&self) -> f32
Get the cached squared L2 norm.
Trait Implementations§
Source§impl Clone for SparseCachedNorm
impl Clone for SparseCachedNorm
Source§fn clone(&self) -> SparseCachedNorm
fn clone(&self) -> SparseCachedNorm
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SparseCachedNorm
impl Debug for SparseCachedNorm
impl Copy for SparseCachedNorm
Auto Trait Implementations§
impl Freeze for SparseCachedNorm
impl RefUnwindSafe for SparseCachedNorm
impl Send for SparseCachedNorm
impl Sync for SparseCachedNorm
impl Unpin for SparseCachedNorm
impl UnwindSafe for SparseCachedNorm
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