pub struct Hamming;Expand description
Compute the hamming distance between bit-vectors.
Trait Implementations§
Source§impl AsFunctor<Hamming> for BinaryQuantizer
impl AsFunctor<Hamming> for BinaryQuantizer
Source§fn as_functor(&self) -> Hamming
fn as_functor(&self) -> Hamming
Return a crate::distances::Hamming functor for performing distance computations
on bit vectors.
Source§impl<A, B, To> DistanceFunction<A, B, To> for Hammingwhere
Hamming: PureDistanceFunction<A, B, To>,
impl<A, B, To> DistanceFunction<A, B, To> for Hammingwhere
Hamming: PureDistanceFunction<A, B, To>,
Source§fn evaluate_similarity(&self, a: A, b: B) -> To
fn evaluate_similarity(&self, a: A, b: B) -> To
Perform a distance computation between the left-hand and right-hand arguments.
Source§impl PureDistanceFunction<BitSliceBase<1, Binary, SlicePtr<'_, u8>>, BitSliceBase<1, Binary, SlicePtr<'_, u8>>, Result<MathematicalValue<u32>, UnequalLengths>> for Hamming
Compute the hamming distance between x and y.
impl PureDistanceFunction<BitSliceBase<1, Binary, SlicePtr<'_, u8>>, BitSliceBase<1, Binary, SlicePtr<'_, u8>>, Result<MathematicalValue<u32>, UnequalLengths>> for Hamming
Compute the hamming distance between x and y.
Returns an error if the arguments have different lengths.
impl Copy for Hamming
Auto Trait Implementations§
impl Freeze for Hamming
impl RefUnwindSafe for Hamming
impl Send for Hamming
impl Sync for Hamming
impl Unpin for Hamming
impl UnsafeUnpin for Hamming
impl UnwindSafe for Hamming
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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