Crate space

Source
Expand description

See the Crates.io page for the README.

Structs§

LinearKnn
Performs a linear knn search by iterating over everything in the space and performing a binary search on running set of neighbors.
Neighbor
For k-NN algorithms to return neighbors.

Traits§

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.
KnnFromBatch
Create a data structure from a batch of data points, such as a vector. For many algorithms, using batch initialization yields better results than inserting the points one at a time.
KnnFromMetricAndBatch
Create a data structure from a metric and a batch of data points, such as a vector. For many algorithms, using batch initialization yields better results than inserting the points one at a time.
KnnInsert
Implement this trait on KNN search data structures that map keys to values and which you can insert new (key, value) pairs.
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.
RangeQuery
Implement this trait on data structures (or wrappers) which perform range queries. The data structure should maintain a key-value mapping between neighbour points and data values.