pub struct SimdDistanceCalculator;Expand description
Optimized distance calculations using SIMD and unsafe code
Implementations§
Source§impl SimdDistanceCalculator
impl SimdDistanceCalculator
Sourcepub fn euclidean_distance_simd(x: &[f64], y: &[f64]) -> f64
pub fn euclidean_distance_simd(x: &[f64], y: &[f64]) -> f64
Optimized Euclidean distance calculation using SIMD
Sourcepub fn manhattan_distance_simd(x: &[f64], y: &[f64]) -> f64
pub fn manhattan_distance_simd(x: &[f64], y: &[f64]) -> f64
Optimized Manhattan distance calculation using SIMD
Sourcepub fn nan_euclidean_distance_simd(x: &[f64], y: &[f64]) -> f64
pub fn nan_euclidean_distance_simd(x: &[f64], y: &[f64]) -> f64
NaN-aware Euclidean distance for missing data
Sourcepub fn cosine_similarity_simd(x: &[f64], y: &[f64]) -> f64
pub fn cosine_similarity_simd(x: &[f64], y: &[f64]) -> f64
Optimized cosine similarity calculation
Auto Trait Implementations§
impl Freeze for SimdDistanceCalculator
impl RefUnwindSafe for SimdDistanceCalculator
impl Send for SimdDistanceCalculator
impl Sync for SimdDistanceCalculator
impl Unpin for SimdDistanceCalculator
impl UnwindSafe for SimdDistanceCalculator
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