Module org.elasticsearch.server
Class ByteRankVectors
java.lang.Object
org.elasticsearch.script.field.vectors.ByteRankVectors
- All Implemented Interfaces:
RankVectors
- Direct Known Subclasses:
BitRankVectors
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final intprotected final intprotected final VectorIterator<byte[]> Fields inherited from interface org.elasticsearch.script.field.vectors.RankVectors
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionByteRankVectors(VectorIterator<byte[]> vectorValues, org.apache.lucene.util.BytesRef magnitudesBytes, int numVecs, int dims) -
Method Summary
Modifier and TypeMethodDescriptionintgetDims()float[]Iterator<float[]> booleanisEmpty()floatmaxSimDotProduct(byte[][] query) floatmaxSimDotProduct(float[][] query) floatmaxSimInvHamming(byte[][] query) intsize()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.script.field.vectors.RankVectors
checkDimensions
-
Field Details
-
vectorValues
-
numVecs
protected final int numVecs -
dims
protected final int dims
-
-
Constructor Details
-
ByteRankVectors
public ByteRankVectors(VectorIterator<byte[]> vectorValues, org.apache.lucene.util.BytesRef magnitudesBytes, int numVecs, int dims)
-
-
Method Details
-
maxSimDotProduct
public float maxSimDotProduct(float[][] query) - Specified by:
maxSimDotProductin interfaceRankVectors
-
maxSimDotProduct
public float maxSimDotProduct(byte[][] query) - Specified by:
maxSimDotProductin interfaceRankVectors
-
maxSimInvHamming
public float maxSimInvHamming(byte[][] query) - Specified by:
maxSimInvHammingin interfaceRankVectors
-
getVectors
- Specified by:
getVectorsin interfaceRankVectors
-
getMagnitudes
public float[] getMagnitudes()- Specified by:
getMagnitudesin interfaceRankVectors
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceRankVectors
-
getDims
public int getDims()- Specified by:
getDimsin interfaceRankVectors
-
size
public int size()- Specified by:
sizein interfaceRankVectors
-