Package io.github.jbellis.jvector.pq
Class BQVectors
java.lang.Object
io.github.jbellis.jvector.pq.BQVectors
- All Implemented Interfaces:
CompressedVectors,Accountable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapproximateScoreFunctionFor(float[] q, VectorSimilarityFunction similarityFunction) booleanlong[]get(int i) intintinthashCode()static BQVectorsload(RandomAccessReader in, long offset) longvoidwrite(DataOutput out) write the compressed vectors to the given DataOutput
-
Constructor Details
-
BQVectors
-
-
Method Details
-
write
Description copied from interface:CompressedVectorswrite the compressed vectors to the given DataOutput- Specified by:
writein interfaceCompressedVectors- Throws:
IOException
-
load
- Throws:
IOException
-
approximateScoreFunctionFor
public NodeSimilarity.ApproximateScoreFunction approximateScoreFunctionFor(float[] q, VectorSimilarityFunction similarityFunction) - Specified by:
approximateScoreFunctionForin interfaceCompressedVectors- Returns:
- a ScoreFunction suitable for performing search against the compressed vectors, potentially without decompression them first
-
get
public long[] get(int i) -
getOriginalSize
public int getOriginalSize()- Specified by:
getOriginalSizein interfaceCompressedVectors- Returns:
- the original size of the vectors, in bytes, before compression
-
getCompressedSize
public int getCompressedSize()- Specified by:
getCompressedSizein interfaceCompressedVectors- Returns:
- the compressed size of the vectors, in bytes
-
ramBytesUsed
public long ramBytesUsed()- Specified by:
ramBytesUsedin interfaceAccountable
-
equals
-
hashCode
public int hashCode()
-