Module org.elasticsearch.server
Class FloatRankVectors
java.lang.Object
org.elasticsearch.script.field.vectors.FloatRankVectors
- All Implemented Interfaces:
RankVectors
-
Field Summary
Fields inherited from interface org.elasticsearch.script.field.vectors.RankVectors
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionFloatRankVectors(VectorIterator<float[]> decodedDocVector, org.apache.lucene.util.BytesRef magnitudes, int numVectors, 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
-
Constructor Details
-
FloatRankVectors
public FloatRankVectors(VectorIterator<float[]> decodedDocVector, org.apache.lucene.util.BytesRef magnitudes, int numVectors, 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
-