Module hnsw_rs::hnsw[][src]

Expand description

A rust implementation of Approximate NN search from:
Efficient and robust approximate nearest neighbour search using Hierarchical Navigable small World graphs. Yu. A. Malkov, D.A Yashunin 2016, 2018

Re-exports

pub use crate::dist::Distance;

Structs

The Base structure for hnsw implementation.
The main useful functions are : new, insert, insert_parallel, search, parallel_search and file_dump as described in trait AnnT.

an iterator on points stored. The iteration begins at level 0 (most populated level) and goes upward in levels. The iterator takes a ReadGuard on the PointIndexation structure

An iterator on points stored in a given layer The iterator stores a ReadGuard on the structure PointIndexation

a struct to randomly generate a level for an item according to an exponential law of parameter given by scale. The distribution is constrained to be in [0..maxlevel[

The struct giving an answer point to a search request. This structure is exported to other language API. First field is origin id of the request point, second field is distance to request point

This unit structure provides the type to instanciate Hnsw with, to get reload of graph only in the the structure. It must be associated to the unit structure dist::NoDist for the distance type to provide.

The basestructure representing a data point.
Its constains data as coming from the client, its client id,
and position in layer representation and neighbours.

The 2-uple represent layer as u8 and rank in layer as a i32 as stored in our structure

A structure containing internal pointId with distance to this pointId. The order is given by ordering the distance to the point it refers to. So points ordering has a meaning only has points refers to the same point

a structure for indexation of points in layer

Type Definitions

this type is for an identificateur of each data vector, given by client. Can be the rank of data in an array, a hash value or anything that permits retrieving the data.