summaryrefslogtreecommitdiffstats
path: root/src/distance.rs
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2020-06-27 17:17:10 -0400
committerTavian Barnes <tavianator@tavianator.com>2020-06-27 17:40:03 -0400
commit07e61231dff21fda6da32929c0eae82fa44f6517 (patch)
tree0279b132f1b3b82f9c4e7ac581d152d052fa3c52 /src/distance.rs
parente466113d70e9786259b3516b5951771b0706e5d8 (diff)
downloadacap-07e61231dff21fda6da32929c0eae82fa44f6517.tar.xz
docs: Update some links
Diffstat (limited to 'src/distance.rs')
-rw-r--r--src/distance.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/distance.rs b/src/distance.rs
index 20d862b..0fc1c2a 100644
--- a/src/distance.rs
+++ b/src/distance.rs
@@ -7,7 +7,7 @@ use num_traits::{Num, NumAssign, Signed};
/// This trait is automatically implemented for all types that support the required operations.
pub trait Value: Copy + Num + NumAssign + Signed + PartialOrd {}
-/// Blanket [Value] implementation.
+/// Blanket [`Value`] implementation.
impl<T: Num + NumAssign + Signed + Copy + PartialOrd> Value for T {}
/// A distance between two points.
@@ -44,7 +44,7 @@ where
}
}
-/// Any numerical distance value can be a [Distance].
+/// Any numerical distance value can be a [`Distance`].
impl<T: Value> Distance for T {
type Value = T;
}
@@ -72,7 +72,7 @@ pub trait Proximity<T: ?Sized = Self> {
/// Shorthand for `K::Distance::Value`.
pub type DistanceValue<K, V = K> = <<K as Proximity<V>>::Distance as Distance>::Value;
-/// Blanket [Proximity] implementation for references.
+/// Blanket [`Proximity`] implementation for references.
impl<'k, 'v, K: Proximity<V>, V> Proximity<&'v V> for &'k K {
type Distance = K::Distance;
@@ -110,5 +110,5 @@ impl<'k, 'v, K: Proximity<V>, V> Proximity<&'v V> for &'k K {
/// [pseudometric spaces]: https://en.wikipedia.org/wiki/Pseudometric_space
pub trait Metric<T: ?Sized = Self>: Proximity<T> {}
-/// Blanket [Metric] implementation for references.
+/// Blanket [`Metric`] implementation for references.
impl<'k, 'v, K: Metric<V>, V> Metric<&'v V> for &'k K {}