Record Class Lucene91HnswVectorsReader.FieldEntry
java.lang.Object
java.lang.Record
org.apache.lucene.backward_codecs.lucene91.Lucene91HnswVectorsReader.FieldEntry
- Enclosing class:
Lucene91HnswVectorsReader
private static record Lucene91HnswVectorsReader.FieldEntry(VectorSimilarityFunction similarityFunction, long vectorDataOffset, long vectorDataLength, long vectorIndexOffset, long vectorIndexLength, int maxConn, int numLevels, int dimension, int size, int[] ordToDoc, IntUnaryOperator ordToDocOperator, int[][] nodesByLevel, long[] graphOffsetsByLevel)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for thedimensionrecord component.private final long[]The field for thegraphOffsetsByLevelrecord component.private final intThe field for themaxConnrecord component.private final int[][]The field for thenodesByLevelrecord component.private final intThe field for thenumLevelsrecord component.private final int[]The field for theordToDocrecord component.private final IntUnaryOperatorThe field for theordToDocOperatorrecord component.private final VectorSimilarityFunctionThe field for thesimilarityFunctionrecord component.private final intThe field for thesizerecord component.private final longThe field for thevectorDataLengthrecord component.private final longThe field for thevectorDataOffsetrecord component.private final longThe field for thevectorIndexLengthrecord component.private final longThe field for thevectorIndexOffsetrecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateFieldEntry(VectorSimilarityFunction similarityFunction, long vectorDataOffset, long vectorDataLength, long vectorIndexOffset, long vectorIndexLength, int maxConn, int numLevels, int dimension, int size, int[] ordToDoc, IntUnaryOperator ordToDocOperator, int[][] nodesByLevel, long[] graphOffsetsByLevel) Creates an instance of aFieldEntryrecord class. -
Method Summary
Modifier and TypeMethodDescription(package private) static Lucene91HnswVectorsReader.FieldEntrycreate(DataInput input, VectorSimilarityFunction similarityFunction) intReturns the value of thedimensionrecord component.final booleanIndicates whether some other object is "equal to" this one.long[]Returns the value of thegraphOffsetsByLevelrecord component.final inthashCode()Returns a hash code value for this object.intmaxConn()Returns the value of themaxConnrecord component.int[][]Returns the value of thenodesByLevelrecord component.intReturns the value of thenumLevelsrecord component.int[]ordToDoc()Returns the value of theordToDocrecord component.(package private) intordToDoc(int ord) Returns the value of theordToDocOperatorrecord component.Returns the value of thesimilarityFunctionrecord component.intsize()Returns the value of thesizerecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of thevectorDataLengthrecord component.longReturns the value of thevectorDataOffsetrecord component.longReturns the value of thevectorIndexLengthrecord component.longReturns the value of thevectorIndexOffsetrecord component.
-
Field Details
-
similarityFunction
The field for thesimilarityFunctionrecord component. -
vectorDataOffset
private final long vectorDataOffsetThe field for thevectorDataOffsetrecord component. -
vectorDataLength
private final long vectorDataLengthThe field for thevectorDataLengthrecord component. -
vectorIndexOffset
private final long vectorIndexOffsetThe field for thevectorIndexOffsetrecord component. -
vectorIndexLength
private final long vectorIndexLengthThe field for thevectorIndexLengthrecord component. -
maxConn
private final int maxConnThe field for themaxConnrecord component. -
numLevels
private final int numLevelsThe field for thenumLevelsrecord component. -
dimension
private final int dimensionThe field for thedimensionrecord component. -
size
private final int sizeThe field for thesizerecord component. -
ordToDoc
private final int[] ordToDocThe field for theordToDocrecord component. -
ordToDocOperator
The field for theordToDocOperatorrecord component. -
nodesByLevel
private final int[][] nodesByLevelThe field for thenodesByLevelrecord component. -
graphOffsetsByLevel
private final long[] graphOffsetsByLevelThe field for thegraphOffsetsByLevelrecord component.
-
-
Constructor Details
-
FieldEntry
private FieldEntry(VectorSimilarityFunction similarityFunction, long vectorDataOffset, long vectorDataLength, long vectorIndexOffset, long vectorIndexLength, int maxConn, int numLevels, int dimension, int size, int[] ordToDoc, IntUnaryOperator ordToDocOperator, int[][] nodesByLevel, long[] graphOffsetsByLevel) Creates an instance of aFieldEntryrecord class.- Parameters:
similarityFunction- the value for thesimilarityFunctionrecord componentvectorDataOffset- the value for thevectorDataOffsetrecord componentvectorDataLength- the value for thevectorDataLengthrecord componentvectorIndexOffset- the value for thevectorIndexOffsetrecord componentvectorIndexLength- the value for thevectorIndexLengthrecord componentmaxConn- the value for themaxConnrecord componentnumLevels- the value for thenumLevelsrecord componentdimension- the value for thedimensionrecord componentsize- the value for thesizerecord componentordToDoc- the value for theordToDocrecord componentordToDocOperator- the value for theordToDocOperatorrecord componentnodesByLevel- the value for thenodesByLevelrecord componentgraphOffsetsByLevel- the value for thegraphOffsetsByLevelrecord component
-
-
Method Details
-
create
static Lucene91HnswVectorsReader.FieldEntry create(DataInput input, VectorSimilarityFunction similarityFunction) throws IOException - Throws:
IOException
-
ordToDoc
int ordToDoc(int ord) -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
similarityFunction
Returns the value of thesimilarityFunctionrecord component.- Returns:
- the value of the
similarityFunctionrecord component
-
vectorDataOffset
public long vectorDataOffset()Returns the value of thevectorDataOffsetrecord component.- Returns:
- the value of the
vectorDataOffsetrecord component
-
vectorDataLength
public long vectorDataLength()Returns the value of thevectorDataLengthrecord component.- Returns:
- the value of the
vectorDataLengthrecord component
-
vectorIndexOffset
public long vectorIndexOffset()Returns the value of thevectorIndexOffsetrecord component.- Returns:
- the value of the
vectorIndexOffsetrecord component
-
vectorIndexLength
public long vectorIndexLength()Returns the value of thevectorIndexLengthrecord component.- Returns:
- the value of the
vectorIndexLengthrecord component
-
maxConn
public int maxConn()Returns the value of themaxConnrecord component.- Returns:
- the value of the
maxConnrecord component
-
numLevels
public int numLevels()Returns the value of thenumLevelsrecord component.- Returns:
- the value of the
numLevelsrecord component
-
dimension
public int dimension()Returns the value of thedimensionrecord component.- Returns:
- the value of the
dimensionrecord component
-
size
public int size()Returns the value of thesizerecord component.- Returns:
- the value of the
sizerecord component
-
ordToDoc
public int[] ordToDoc()Returns the value of theordToDocrecord component.- Returns:
- the value of the
ordToDocrecord component
-
ordToDocOperator
Returns the value of theordToDocOperatorrecord component.- Returns:
- the value of the
ordToDocOperatorrecord component
-
nodesByLevel
public int[][] nodesByLevel()Returns the value of thenodesByLevelrecord component.- Returns:
- the value of the
nodesByLevelrecord component
-
graphOffsetsByLevel
public long[] graphOffsetsByLevel()Returns the value of thegraphOffsetsByLevelrecord component.- Returns:
- the value of the
graphOffsetsByLevelrecord component
-