Package com.apple.foundationdb.async.common
package com.apple.foundationdb.async.common
Common logic for all kinds of structures for effectively searching, retrieving and managing vectors.
-
ClassDescriptionA record-like class wrapping a
RealVectorand a count.DistinctTopK<T>A fixed-capacity collector that retains the topkdistinct elements offered, as ordered by aComparator(thekthat compare greatest).Interface for call backs whenever we read data from the database.Interface for call backs whenever we write data to the database.Record class that wraps the results of a kNN-search.Static helpers for the storage layer shared by the vector index implementations: (de)serializing vectors to and from theirTupleand byte representations, and appending to, consuming, aggregating, and clearing the set of sampled vectors held in a subspace.A special operator that is used to rotate, translate, and potentially normalize vectors.Wraps anAsyncIterableso the wall-clock time spent awaiting its elements is measured and reported once the scan finishes.TopK<T>A fixed-capacity collector that retains the topkelements offered, as ordered by aComparator(thekthat compare greatest).The minimal vector-encoding configuration shared by the HNSW and Guardiann configs: the metric, the number of dimensions, and the RaBitQ encoding parameters needed to (de)serialize stored vectors.