pub struct PrenormCosine<T>(pub T);Expand description
Equips any coordinate space with the cosine distance function for pre-normalized (unit magnitude) points.
Tuple Fields§
§0: TTrait Implementations§
Source§impl<T: Clone> Clone for PrenormCosine<T>
impl<T: Clone> Clone for PrenormCosine<T>
Source§fn clone(&self) -> PrenormCosine<T>
fn clone(&self) -> PrenormCosine<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Debug> Debug for PrenormCosine<T>
impl<T: Debug> Debug for PrenormCosine<T>
Source§impl<T: PartialEq> PartialEq for PrenormCosine<T>
impl<T: PartialEq> PartialEq for PrenormCosine<T>
Source§impl<T> Proximity<T> for PrenormCosine<T>
impl<T> Proximity<T> for PrenormCosine<T>
Source§impl<T> Proximity for PrenormCosine<T>
impl<T> Proximity for PrenormCosine<T>
impl<T: Copy> Copy for PrenormCosine<T>
impl<T: Eq> Eq for PrenormCosine<T>
impl<T> StructuralPartialEq for PrenormCosine<T>
Auto Trait Implementations§
impl<T> Freeze for PrenormCosine<T>where
T: Freeze,
impl<T> RefUnwindSafe for PrenormCosine<T>where
T: RefUnwindSafe,
impl<T> Send for PrenormCosine<T>where
T: Send,
impl<T> Sync for PrenormCosine<T>where
T: Sync,
impl<T> Unpin for PrenormCosine<T>where
T: Unpin,
impl<T> UnwindSafe for PrenormCosine<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<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.