pub struct SimdDistanceOps;Expand description
SIMD-optimized distance operations
Implementations§
Source§impl SimdDistanceOps
impl SimdDistanceOps
Sourcepub fn find_min(distances: &DistanceArray) -> (f64, usize)
pub fn find_min(distances: &DistanceArray) -> (f64, usize)
Find minimum distance and its index (scalar fallback)
Sourcepub fn relax_batch(
distances: &mut DistanceArray,
source_dist: f64,
neighbors: &[(VertexId, f64)],
) -> usize
pub fn relax_batch( distances: &mut DistanceArray, source_dist: f64, neighbors: &[(VertexId, f64)], ) -> usize
Batch update (scalar fallback)
Sourcepub fn count_below_threshold(distances: &DistanceArray, threshold: f64) -> usize
pub fn count_below_threshold(distances: &DistanceArray, threshold: f64) -> usize
Count vertices with distance less than threshold (scalar fallback)
Sourcepub fn sum_finite(distances: &DistanceArray) -> (f64, usize)
pub fn sum_finite(distances: &DistanceArray) -> (f64, usize)
Compute sum of distances (for average)
Sourcepub fn elementwise_min(a: &DistanceArray, b: &DistanceArray) -> DistanceArray
pub fn elementwise_min(a: &DistanceArray, b: &DistanceArray) -> DistanceArray
Element-wise minimum of two distance arrays
Sourcepub fn scale(distances: &mut DistanceArray, factor: f64)
pub fn scale(distances: &mut DistanceArray, factor: f64)
Scale all distances by a factor
Auto Trait Implementations§
impl Freeze for SimdDistanceOps
impl RefUnwindSafe for SimdDistanceOps
impl Send for SimdDistanceOps
impl Sync for SimdDistanceOps
impl Unpin for SimdDistanceOps
impl UnwindSafe for SimdDistanceOps
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