diff --git a/algorithms/linfa-nn/src/balltree.rs b/algorithms/linfa-nn/src/balltree.rs index e29045609..8954b6991 100644 --- a/algorithms/linfa-nn/src/balltree.rs +++ b/algorithms/linfa-nn/src/balltree.rs @@ -158,7 +158,7 @@ impl<'a, F: Float> BallTreeInner<'a, F> { } } -/// Spatial indexing structure created by [`BallTree`](BallTree) +/// Spatial indexing structure created by [`BallTree`] #[derive(Debug, Clone, PartialEq)] pub struct BallTreeIndex<'a, F: Float, D: Distance> { tree: BallTreeInner<'a, F>, @@ -282,7 +282,7 @@ impl<'a, F: Float, D: Distance> NearestNeighbourIndex for BallTreeIndex<'a /// Implementation of ball tree, a space partitioning data structure that partitions its points /// into nested hyperspheres called "balls". It performs spatial queries in `O(k * logN)` time, /// where `k` is the number of points returned by the query. Calling `from_batch` returns a -/// [`BallTreeIndex`](BallTreeIndex). +/// [`BallTreeIndex`]. /// /// More details can be found [here](https://en.wikipedia.org/wiki/Ball_tree). This implementation /// is based off of the [ball_tree](https://docs.rs/ball-tree/0.2.0/ball_tree/) crate. diff --git a/algorithms/linfa-nn/src/kdtree.rs b/algorithms/linfa-nn/src/kdtree.rs index d6ec643bb..b04135488 100644 --- a/algorithms/linfa-nn/src/kdtree.rs +++ b/algorithms/linfa-nn/src/kdtree.rs @@ -8,7 +8,7 @@ use crate::{ NnError, Point, }; -/// Spatial indexing structure created by [`KdTree`](KdTree) +/// Spatial indexing structure created by [`KdTree`] #[derive(Debug)] pub struct KdTreeIndex<'a, F: Float, D: Distance>( kdtree::KdTree, usize), &'a [F]>, @@ -90,7 +90,7 @@ impl<'a, F: Float, D: Distance> NearestNeighbourIndex for KdTreeIndex<'a, /// Implementation of K-D tree, a fast space-partitioning data structure. For each parent node, /// the indexed points are split with a hyperplane into two child nodes. Due to its tree-like /// structure, the K-D tree performs spatial queries in `O(k * logN)` time, where `k` is the number -/// of points returned by the query. Calling `from_batch` returns a [`KdTree`](KdTree). +/// of points returned by the query. Calling `from_batch` returns a [`KdTree`]. /// /// More details can be found [here](https://en.wikipedia.org/wiki/K-d_tree). /// diff --git a/algorithms/linfa-nn/src/lib.rs b/algorithms/linfa-nn/src/lib.rs index 599b60018..87a2d0c1a 100644 --- a/algorithms/linfa-nn/src/lib.rs +++ b/algorithms/linfa-nn/src/lib.rs @@ -58,7 +58,7 @@ pub enum NnError { /// Nearest neighbour algorithm builds a spatial index structure out of a batch of points. The /// distance between points is calculated using a provided distance function. The index implements -/// the [`NearestNeighbourIndex`](NearestNeighbourIndex) trait and allows for efficient +/// the [`NearestNeighbourIndex`] trait and allows for efficient /// computing of nearest neighbour and range queries. pub trait NearestNeighbour: std::fmt::Debug + Send + Sync + Unpin { /// Builds a spatial index using a MxN two-dimensional array representing M points with N @@ -115,7 +115,7 @@ pub trait NearestNeighbourIndex: Send + Sync + Unpin { ) -> Result, usize)>, NnError>; } -/// Enum that dispatches to one of the crate's [`NearestNeighbour`](NearestNeighbour) +/// Enum that dispatches to one of the crate's [`NearestNeighbour`] /// implementations based on value. This enum should be used instead of using types like /// `LinearSearch` and `KdTree` directly. /// diff --git a/algorithms/linfa-nn/src/linear.rs b/algorithms/linfa-nn/src/linear.rs index d227e1833..a9948a1a0 100644 --- a/algorithms/linfa-nn/src/linear.rs +++ b/algorithms/linfa-nn/src/linear.rs @@ -11,7 +11,7 @@ use crate::{ NearestNeighbourIndex, NnError, Point, }; -/// Spatial indexing structure created by [`LinearSearch`](LinearSearch) +/// Spatial indexing structure created by [`LinearSearch`] #[derive(Debug, Clone, PartialEq)] pub struct LinearSearchIndex<'a, F: Float, D: Distance>(ArrayView2<'a, F>, D); @@ -76,7 +76,7 @@ impl<'a, F: Float, D: Distance> NearestNeighbourIndex for LinearSearchInde /// Implementation of linear search, which is the simplest nearest neighbour algorithm. All queries /// are implemented by scanning through every point, so all of them are `O(N)`. Calling -/// `from_batch` returns a [`LinearSearchIndex`](LinearSearchIndex). +/// `from_batch` returns a [`LinearSearchIndex`]. #[derive(Default, Clone, Debug, PartialEq, Eq)] #[cfg_attr( feature = "serde", diff --git a/algorithms/linfa-trees/src/decision_trees/algorithm.rs b/algorithms/linfa-trees/src/decision_trees/algorithm.rs index a281db39d..c460a9299 100644 --- a/algorithms/linfa-trees/src/decision_trees/algorithm.rs +++ b/algorithms/linfa-trees/src/decision_trees/algorithm.rs @@ -615,7 +615,7 @@ impl DecisionTree { self.iter_nodes().filter(|node| node.is_leaf()).count() } - /// Generates a [`Tikz`](Tikz) structure to print the + /// Generates a [`Tikz`] structure to print the /// fitted tree in Tex using tikz and forest, with the following default parameters: /// /// * `legend=false` diff --git a/src/metrics_regression.rs b/src/metrics_regression.rs index b1b5bfcb4..b380c93f1 100644 --- a/src/metrics_regression.rs +++ b/src/metrics_regression.rs @@ -14,7 +14,7 @@ use std::ops::{Div, Sub}; /// Regression metrices trait for single targets. /// /// It is possible to compute the listed mectrics between two 1D arrays. -/// To compare bi-dimensional arrays use [`MultiTargetRegression`](MultiTargetRegression). +/// To compare bi-dimensional arrays use [`MultiTargetRegression`]. pub trait SingleTargetRegression>: AsSingleTargets { @@ -135,7 +135,7 @@ impl, T2: AsSingleTargets, D: D /// Regression metrices trait for multiple targets. /// /// It is possible to compute the listed mectrics between two 2D arrays. -/// To compare single-dimensional arrays use [`SingleTargetRegression`](SingleTargetRegression). +/// To compare single-dimensional arrays use [`SingleTargetRegression`]. pub trait MultiTargetRegression>: AsMultiTargets {