[−][src]Struct acap::euclid::Euclidean
A point in Euclidean space.
This wrapper equips any coordinate space with the Euclidean distance metric.
Implementations
impl<T> Euclidean<T>
[src]
pub fn new(point: T) -> Self
[src]
Wrap a point.
pub fn inner(&self) -> &T
[src]
Unwrap a point.
pub fn into_inner(self) -> T
[src]
Unwrap a point.
Trait Implementations
impl<T: Clone> Clone for Euclidean<T>
[src]
impl<T> CoordinateMetric<<T as Coordinates>::Value> for Euclidean<T> where
T: Coordinates,
EuclideanDistance<T::Value>: Distance,
[src]
T: Coordinates,
EuclideanDistance<T::Value>: Distance,
impl<T> CoordinateProximity<<T as Coordinates>::Value> for Euclidean<T> where
T: Coordinates,
EuclideanDistance<T::Value>: Distance,
[src]
T: Coordinates,
EuclideanDistance<T::Value>: Distance,
type Distance = EuclideanDistance<T::Value>
fn distance_to_coords(&self, coords: &[T::Value]) -> Self::Distance
[src]
impl<T: Coordinates> Coordinates for Euclidean<T>
[src]
type Value = T::Value
The type of individual coordinates.
fn dims(&self) -> usize
[src]
fn coord(&self, i: usize) -> Self::Value
[src]
fn as_vec(&self) -> Vec<Self::Value>
[src]
impl<T: Copy> Copy for Euclidean<T>
[src]
impl<T: Debug> Debug for Euclidean<T>
[src]
impl<T: Eq> Eq for Euclidean<T>
[src]
impl<T> Metric<Euclidean<T>> for Euclidean<T> where
T: Coordinates,
EuclideanDistance<T::Value>: Distance,
[src]
T: Coordinates,
EuclideanDistance<T::Value>: Distance,
Euclidean distance is a metric.
impl<T> Metric<Euclidean<T>> for T where
T: Coordinates,
EuclideanDistance<T::Value>: Distance,
[src]
T: Coordinates,
EuclideanDistance<T::Value>: Distance,
impl<T> Metric<T> for Euclidean<T> where
T: Coordinates,
EuclideanDistance<T::Value>: Distance,
[src]
T: Coordinates,
EuclideanDistance<T::Value>: Distance,
impl<T: PartialEq> PartialEq<Euclidean<T>> for Euclidean<T>
[src]
impl<T> Proximity<Euclidean<T>> for Euclidean<T> where
T: Coordinates,
EuclideanDistance<T::Value>: Distance,
[src]
T: Coordinates,
EuclideanDistance<T::Value>: Distance,
The Euclidean distance function.
type Distance = EuclideanDistance<T::Value>
The type that represents distances.
fn distance(&self, other: &Self) -> Self::Distance
[src]
impl<T> Proximity<Euclidean<T>> for T where
T: Coordinates,
EuclideanDistance<T::Value>: Distance,
[src]
T: Coordinates,
EuclideanDistance<T::Value>: Distance,
type Distance = EuclideanDistance<T::Value>
The type that represents distances.
fn distance(&self, other: &Euclidean<T>) -> Self::Distance
[src]
impl<T> Proximity<T> for Euclidean<T> where
T: Coordinates,
EuclideanDistance<T::Value>: Distance,
[src]
T: Coordinates,
EuclideanDistance<T::Value>: Distance,
type Distance = EuclideanDistance<T::Value>
The type that represents distances.
fn distance(&self, other: &T) -> Self::Distance
[src]
impl<T> StructuralEq for Euclidean<T>
[src]
impl<T> StructuralPartialEq for Euclidean<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Euclidean<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Euclidean<T> where
T: Send,
T: Send,
impl<T> Sync for Euclidean<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Euclidean<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Euclidean<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<K, V> KdMetric<V> for K where
K: KdProximity<V> + Metric<V> + CoordinateMetric<<V as Coordinates>::Value>,
V: Coordinates,
[src]
K: KdProximity<V> + Metric<V> + CoordinateMetric<<V as Coordinates>::Value>,
V: Coordinates,
impl<K, V> KdProximity<V> for K where
K: Coordinates<Value = <V as Coordinates>::Value> + Proximity<V> + CoordinateProximity<<V as Coordinates>::Value, Distance = <K as Proximity<V>>::Distance>,
V: Coordinates,
[src]
K: Coordinates<Value = <V as Coordinates>::Value> + Proximity<V> + CoordinateProximity<<V as Coordinates>::Value, Distance = <K as Proximity<V>>::Distance>,
V: Coordinates,
impl<T> Metric<Angular<T>> for T where
T: Coordinates,
<T as Coordinates>::Value: Real,
AngularDistance<<T as Coordinates>::Value>: Distance,
[src]
T: Coordinates,
<T as Coordinates>::Value: Real,
AngularDistance<<T as Coordinates>::Value>: Distance,
impl<T> Metric<Chebyshev<T>> for T where
T: Coordinates,
[src]
T: Coordinates,
impl<T> Metric<Euclidean<T>> for T where
T: Coordinates,
EuclideanDistance<<T as Coordinates>::Value>: Distance,
[src]
T: Coordinates,
EuclideanDistance<<T as Coordinates>::Value>: Distance,
impl<T> Metric<Euclidean<T>> for T where
T: Coordinates,
EuclideanDistance<<T as Coordinates>::Value>: Distance,
[src]
T: Coordinates,
EuclideanDistance<<T as Coordinates>::Value>: Distance,
impl<T> Metric<Euclidean<T>> for T where
T: Coordinates,
EuclideanDistance<<T as Coordinates>::Value>: Distance,
[src]
T: Coordinates,
EuclideanDistance<<T as Coordinates>::Value>: Distance,
impl<T> Metric<PrenormAngular<T>> for T where
T: Coordinates,
<T as Coordinates>::Value: Real,
AngularDistance<<T as Coordinates>::Value>: Distance,
[src]
T: Coordinates,
<T as Coordinates>::Value: Real,
AngularDistance<<T as Coordinates>::Value>: Distance,
impl<T> Metric<Taxicab<T>> for T where
T: Coordinates,
[src]
T: Coordinates,
impl<T> Proximity<Angular<T>> for T where
T: Coordinates,
<T as Coordinates>::Value: Real,
AngularDistance<<T as Coordinates>::Value>: Distance,
[src]
T: Coordinates,
<T as Coordinates>::Value: Real,
AngularDistance<<T as Coordinates>::Value>: Distance,
type Distance = AngularDistance<<T as Coordinates>::Value>
The type that represents distances.
fn distance(&Self, &Angular<T>) -> <T as Proximity<Angular<T>>>::Distance
[src]
impl<T> Proximity<Chebyshev<T>> for T where
T: Coordinates,
[src]
T: Coordinates,
type Distance = <T as Coordinates>::Value
The type that represents distances.
fn distance(&Self, &Chebyshev<T>) -> <T as Proximity<Chebyshev<T>>>::Distance
[src]
impl<T> Proximity<Cosine<T>> for T where
T: Coordinates,
<T as Coordinates>::Value: Real,
[src]
T: Coordinates,
<T as Coordinates>::Value: Real,
type Distance = <T as Coordinates>::Value
The type that represents distances.
fn distance(&Self, &Cosine<T>) -> <T as Proximity<Cosine<T>>>::Distance
[src]
impl<T> Proximity<Euclidean<T>> for T where
T: Coordinates,
EuclideanDistance<<T as Coordinates>::Value>: Distance,
[src]
T: Coordinates,
EuclideanDistance<<T as Coordinates>::Value>: Distance,
type Distance = EuclideanDistance<<T as Coordinates>::Value>
The type that represents distances.
fn distance(&Self, &Euclidean<T>) -> <T as Proximity<Euclidean<T>>>::Distance
[src]
impl<T> Proximity<Euclidean<T>> for T where
T: Coordinates,
EuclideanDistance<<T as Coordinates>::Value>: Distance,
[src]
T: Coordinates,
EuclideanDistance<<T as Coordinates>::Value>: Distance,
type Distance = EuclideanDistance<<T as Coordinates>::Value>
The type that represents distances.
fn distance(&Self, &Euclidean<T>) -> <T as Proximity<Euclidean<T>>>::Distance
[src]
impl<T> Proximity<Euclidean<T>> for T where
T: Coordinates,
EuclideanDistance<<T as Coordinates>::Value>: Distance,
[src]
T: Coordinates,
EuclideanDistance<<T as Coordinates>::Value>: Distance,
type Distance = EuclideanDistance<<T as Coordinates>::Value>
The type that represents distances.
fn distance(&Self, &Euclidean<T>) -> <T as Proximity<Euclidean<T>>>::Distance
[src]
impl<T> Proximity<PrenormAngular<T>> for T where
T: Coordinates,
<T as Coordinates>::Value: Real,
AngularDistance<<T as Coordinates>::Value>: Distance,
[src]
T: Coordinates,
<T as Coordinates>::Value: Real,
AngularDistance<<T as Coordinates>::Value>: Distance,
type Distance = AngularDistance<<T as Coordinates>::Value>
The type that represents distances.
fn distance(
&Self,
&PrenormAngular<T>
) -> <T as Proximity<PrenormAngular<T>>>::Distance
[src]
&Self,
&PrenormAngular<T>
) -> <T as Proximity<PrenormAngular<T>>>::Distance
impl<T> Proximity<PrenormCosine<T>> for T where
T: Coordinates,
<T as Coordinates>::Value: Real,
[src]
T: Coordinates,
<T as Coordinates>::Value: Real,
type Distance = <T as Coordinates>::Value
The type that represents distances.
fn distance(
&Self,
&PrenormCosine<T>
) -> <T as Proximity<PrenormCosine<T>>>::Distance
[src]
&Self,
&PrenormCosine<T>
) -> <T as Proximity<PrenormCosine<T>>>::Distance
impl<T> Proximity<Taxicab<T>> for T where
T: Coordinates,
[src]
T: Coordinates,
type Distance = <T as Coordinates>::Value
The type that represents distances.
fn distance(&Self, &Taxicab<T>) -> <T as Proximity<Taxicab<T>>>::Distance
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,