Expand description
See the Crates.io page for the README.
Structs§
- Linear
Container - Linear
Search - Performs a linear knn search by iterating one-by-one over the dataset and keeping a running set of neighbors which it searches through with binary search.
Traits§
- Approximate
Space - Implement this trait on data structures (or wrappers) which perform spatial searches.
- Exact
Space - This marker trait indicates that the methods provided by search algorithms are exact. It has no further functionality at this time. Implement this on search data structures that guarantee exact nearest neighbor search.
- Knn
- Implement this trait on data structures (or wrappers) which perform KNN searches. The data structure should maintain a key-value mapping between neighbour points and data values. It must be able to output the distance between the query point and the neighbours, which is included in the results.
- Metric
- This trait is implemented for metrics that form a metric space.
It is primarily used for keys in nearest neighbor searches.
When implementing this trait, it is recommended to choose the smallest unsigned integer that
represents your metric space, but you may also use a float so long as you wrap it in
a newtype that enforces the
Ord + Zero + Copy
trait bounds. It is recommended to useNoisyFloat
for this purpose, as it implements the trait bound. - NSphere
Range Query - Implement this trait on data structures (or wrappers) which perform n-sphere range queries. The data structure should maintain a key-value mapping between neighbour points and data values. It must be able to output the distance between the query point and the neighbours, which is included in the results.
- Spatial
Container - Implement this trait on spatial containers that map points to values.
Functions§
- linear_
knn - This function performs exact linear nearest neighbor search.
- linear_
nn - This function performs exact linear nearest neighbor search.