IVFADC.AbstractCoarseQuantizerIVFADC.HNSWQuantizerIVFADC.IVFADCIndexIVFADC.IVFADCIndexIVFADC.InvertedIndexIVFADC.InvertedListIVFADC.NaiveQuantizerBase.lengthBase.pop!Base.popfirst!Base.push!Base.pushfirst!Base.sizeHNSW.knn_searchIVFADC.delete_from_index!
IVFADC.IVFADCIndex — Type.IVFADCIndex{U<:Unsigned, I<:Unsigned, Dc<:Distances.PreMetric, Dr<:Distances.PreMetric, T<:AbstractFloat, Q<:AbstractCoarseQuantizer{Dc,T}}The inverse file system object. It allows for approximate nearest neighbor search into the contained vectors.
Fields
coarse_quantizer::AbstractCoarseQuantizer{Dc,T}contains the coarse vectorsresidual_quantizer::QuantizedArrays.OrthogonalQuantizer{U,Dr,T,2}
is employed to quantize vectors when adding to the index
inverse_index::InvertedIndex{I,U}is the actual inverse index employed
to perform the search.
IVFADC.IVFADCIndex — Method.IVFADCIndex(data [;kwargs])Main constructor for building an inverse file system for billion-scale ANN search.
Arguments
Matrix{T<:AbstractFloat}input data
Keyword arguments
kc::Int=DEFAULT_COARSE_Knumber of clusters (Voronoi cells) to employ
in the coarse quantization step
k::Int=DEFAULT_QUANTIZATION_Knumber of residual quantization levels to usem::Int=DEFAULT_QUANTIZATION_Mnumber of residual quantizers to usecoarse_quantizer::Symbol=DEFAULT_COARSE_QUANTIZERcoarse quantizercoarse_distance=DEFAULT_COARSE_DISTANCEcoarse quantization distancequantization_distance=DEFAULT_QUANTIZATION_DISTANCEresidual quantization distancequantization_method=DEFAULT_QUANTIZATION_METHODresidual quantization methodcoarse_maxiter=DEFAULT_COARSE_MAXITERnumber of clustering iterations for obtaining
the coarse vectors
quantization_maxiter=DEFAULT_QUANTIZATION_MAXITERnumber of clustering iterations for
residual quantization
index_type=UInt32type for the indexes of the vectors in the inverted list
HNSW.knn_search — Method.knn_search(ivfadc, point, k[; w=1])Searches at most k closest neighbors of point in the index ivfadc; the neighbors will be searched for in the points contained in the closest w clusters.
IVFADC.delete_from_index! — Method.delete_from_index!(ivfadc, points)Deletes the points with indices contained in points from the index ivfadc.
IVFADC.AbstractCoarseQuantizer — Type.Abstract coarse quantizer type. The coarse quantizer is ment to assign a point to a given number of Voronoi cells in which its neighbors will be searched.
IVFADC.HNSWQuantizer — Type.HNSWQuantizer{U<:Unsigned, V<:Vector{Vector{T}}, D<:Distances.PreMetric, T<:AbstractFloat}Coarse quantization structure based on HNSW search structure. The hnsw field contains the coarse vectors.
IVFADC.InvertedIndex — Type.Simple alias for Vector{InvertedList{I<:Unsigned, U<:Unsigned}}.
IVFADC.InvertedList — Type.InvertedList{I<:Unsigned, U<:Unsigned}Basic structure which corresponds to the points found within a Voronoi cell. The fields idxs contains the indices of the points while codes contains quantized vector data.
IVFADC.NaiveQuantizer — Type.NaiveQuantizer{D<:Distances.PreMetric, T<:AbstractFloat}Coarse quantization structure based on brute force search. The vector fields contains the coarse vectors while distance contains the distance that is used to calculate the distance from a point to the coarse vectors.
Base.length — Method.length(ivfadc::IVFADCIndex)Returns the number of vectors indexed by ivfadc.
Base.pop! — Method.pop!(ivfadc)Pops from the index ivfadc the point with the highest index and returns it updating the index as well.
Base.popfirst! — Method.popfirst!(ivfadc)Pops from the index ivfadc the first point and returns it updating the index as well.
Base.push! — Method.push!(ivfadc, point)Pushes point to the end of index ivfadc; the point is assigned to a cluster and its quantized code added to the inverted list corresponding to the cluster.
Base.pushfirst! — Method.pushfirst!(ivfadc, point)Pushes point to the beginning of index ivfadc; the point is assigned to a cluster and its quantized code added to the inverted list corresponding to the cluster.
Base.size — Method.size(ivfadc::IVFADCIndex)Returns a tuple with the dimensionality and number of the vectors indexed by ivfadc.