pub struct Chebyshev<T>(pub T);Expand description
A point in Chebyshev space.
This wrapper equips any coordinate space with the Chebyshev distance metric.
Tuple Fields§
§0: TImplementations§
Trait Implementations§
Source§impl<T: Coordinates> Coordinates for Chebyshev<T>
impl<T: Coordinates> Coordinates for Chebyshev<T>
Source§type Value = <T as Coordinates>::Value
type Value = <T as Coordinates>::Value
The type of individual coordinates.
Source§impl<T: Coordinates> Proximity<T> for Chebyshev<T>
impl<T: Coordinates> Proximity<T> for Chebyshev<T>
Source§impl<T: Coordinates> Proximity for Chebyshev<T>
The Chebyshev distance function.
impl<T: Coordinates> Proximity for Chebyshev<T>
The Chebyshev distance function.
impl<T: Copy> Copy for Chebyshev<T>
impl<T: Eq> Eq for Chebyshev<T>
impl<T: Coordinates> Metric<T> for Chebyshev<T>
impl<T: Coordinates> Metric for Chebyshev<T>
Chebyshev distance is a metric.
impl<T: Coordinates> Minkowski<T> for Chebyshev<T>
impl<T: Coordinates> Minkowski for Chebyshev<T>
Chebyshev distance is a Minkowski distance.
impl<T> StructuralPartialEq for Chebyshev<T>
Auto Trait Implementations§
impl<T> Freeze for Chebyshev<T>where
T: Freeze,
impl<T> RefUnwindSafe for Chebyshev<T>where
T: RefUnwindSafe,
impl<T> Send for Chebyshev<T>where
T: Send,
impl<T> Sync for Chebyshev<T>where
T: Sync,
impl<T> Unpin for Chebyshev<T>where
T: Unpin,
impl<T> UnwindSafe for Chebyshev<T>where
T: UnwindSafe,
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> Proximity<Chebyshev<T>> for Twhere
T: Coordinates,
impl<T> Proximity<Chebyshev<T>> for Twhere
T: Coordinates,
Source§impl<T> Proximity<PrenormCosine<T>> for T
impl<T> Proximity<PrenormCosine<T>> for T
Source§type Distance = <T as Coordinates>::Value
type Distance = <T as Coordinates>::Value
The type that represents distances.
Source§fn distance(
&self,
other: &PrenormCosine<T>,
) -> <T as Proximity<PrenormCosine<T>>>::Distance
fn distance( &self, other: &PrenormCosine<T>, ) -> <T as Proximity<PrenormCosine<T>>>::Distance
Calculate the distance between this point and another one.