Crate space

Source
Expand description

See the Crates.io page for the README.

Structs§

LinearContainer
LinearSearch
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§

ApproximateSpace
Implement this trait on data structures (or wrappers) which perform spatial searches.
ExactSpace
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 use NoisyFloat for this purpose, as it implements the trait bound.
NSphereRangeQuery
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.
SpatialContainer
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.

Type Aliases§

MetricUnit