pub struct FunctionDistanceMetric<'a, F: Fn(&Array1<f32>, &Array1<f32>) -> f32> { /* private fields */ }Expand description
Convenience struct used for implementing DistanceMetric for plain functions.
Trait Implementations§
Auto Trait Implementations§
impl<'a, F> Freeze for FunctionDistanceMetric<'a, F>
impl<'a, F> RefUnwindSafe for FunctionDistanceMetric<'a, F>where
F: RefUnwindSafe,
impl<'a, F> Send for FunctionDistanceMetric<'a, F>where
F: Sync,
impl<'a, F> Sync for FunctionDistanceMetric<'a, F>where
F: Sync,
impl<'a, F> Unpin for FunctionDistanceMetric<'a, F>
impl<'a, F> UnwindSafe for FunctionDistanceMetric<'a, F>where
F: RefUnwindSafe,
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