Package io.github.jbellis.jvector.pq
Class PQVectors
java.lang.Object
io.github.jbellis.jvector.pq.PQVectors
- All Implemented Interfaces:
CompressedVectors,Accountable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapproximateScoreFunctionFor(float[] q, VectorSimilarityFunction similarityFunction) booleanintintinthashCode()static CompressedVectorsload(RandomAccessReader in, long offset) longvoidwrite(DataOutput out) write the compressed vectors to the given DataOutput
-
Constructor Details
-
PQVectors
-
-
Method Details
-
write
Description copied from interface:CompressedVectorswrite the compressed vectors to the given DataOutput- Specified by:
writein interfaceCompressedVectors- Throws:
IOException
-
load
- Throws:
IOException
-
equals
-
hashCode
public int hashCode() -
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
-
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
-