Navigable Small-World graph, nominally Hierarchical but currently only has a single layer. Provides efficient approximate nearest neighbor search for high dimensional vectors.
Interface Summary Interface Description RandomAccessVectorValues<T>Provides random access to vectors by dense ordinal.
Class Summary Class Description HnswGraphHierarchical Navigable Small World graph. HnswGraph.ArrayNodesIteratorNodesIterator that accepts nodes as an integer array. HnswGraph.CollectionNodesIteratorNodes iterator based on set representation of nodes. HnswGraph.NodesIteratorIterator over the graph nodes on a certain level, Iterator also provides the size – the total number of nodes to be iterated over. HnswGraphBuilder<T>Builder for HNSW graph. HnswGraphSearcher<T>Searches an HNSW graph to find nearest neighbors to a query vector. NeighborArrayNeighborArray encodes the neighbors of a node and their mutual scores in the HNSW graph as a pair of growable arrays. NeighborQueueNeighborQueue uses a
LongHeapto store lists of arcs in an HNSW graph, represented as a neighbor node id with an associated score packed together as a sortable long, which is sorted primarily by score.
HnswGraphwhere all nodes and connections are held in memory.