java.lang.Object
org.elasticsearch.script.field.vectors.ESVectorUtil
This class consists of a single utility method that provides XOR bit count computed over signed bytes.
Remove this class when Lucene version > 9.11 is released, and replace with Lucene's VectorUtil directly.
-
Method Summary
Modifier and TypeMethodDescriptionstatic intxorBitCount(byte[] a, byte[] b) XOR bit count computed over signed bytes.
-
Method Details
-
xorBitCount
public static int xorBitCount(byte[] a, byte[] b) XOR bit count computed over signed bytes.- Parameters:
a- bytes containing a vectorb- bytes containing another vector, of the same dimension- Returns:
- the value of the XOR bit count of the two vectors
-