Package org.apache.lucene.util.bkd
Record Class BKDConfig
java.lang.Object
java.lang.Record
org.apache.lucene.util.bkd.BKDConfig
- Record Components:
numDims- How many dimensions we are storing at the leaf (data) nodenumIndexDims- How many dimensions we are indexing in the internal nodesbytesPerDim- How many bytes each value in each dimension takes.maxPointsInLeafNode- max points allowed on a Leaf block
public record BKDConfig(int numDims, int numIndexDims, int bytesPerDim, int maxPointsInLeafNode)
extends Record
Basic parameters for indexing points on the BKD tree.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDefault maximum number of point in each leaf blockstatic final intMaximum number of index dimensions (2 * max index dimensions)static final intMaximum number of index dimensions -
Constructor Summary
ConstructorsConstructorDescriptionBKDConfig(int numDims, int numIndexDims, int bytesPerDim, int maxPointsInLeafNode) Creates an instance of aBKDConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thebytesPerDimrecord component.int(numDims * bytesPerDim) + Integer.BYTES (packedBytesLength plus docID size)final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of themaxPointsInLeafNoderecord component.intnumDims()Returns the value of thenumDimsrecord component.intReturns the value of thenumIndexDimsrecord component.static BKDConfigof(int numDims, int numIndexDims, int bytesPerDim, int maxPointsInLeafNode) intnumDims * bytesPerDimintnumIndexDims * bytesPerDimfinal StringtoString()Returns a string representation of this record class.
-
Field Details
-
DEFAULT_MAX_POINTS_IN_LEAF_NODE
public static final int DEFAULT_MAX_POINTS_IN_LEAF_NODEDefault maximum number of point in each leaf block- See Also:
-
MAX_DIMS
public static final int MAX_DIMSMaximum number of index dimensions (2 * max index dimensions)- See Also:
-
MAX_INDEX_DIMS
public static final int MAX_INDEX_DIMSMaximum number of index dimensions- See Also:
-
-
Constructor Details
-
BKDConfig
public BKDConfig(int numDims, int numIndexDims, int bytesPerDim, int maxPointsInLeafNode) Creates an instance of aBKDConfigrecord class.- Parameters:
numDims- the value for thenumDimsrecord componentnumIndexDims- the value for thenumIndexDimsrecord componentbytesPerDim- the value for thebytesPerDimrecord componentmaxPointsInLeafNode- the value for themaxPointsInLeafNoderecord component
-
-
Method Details
-
of
-
packedBytesLength
public int packedBytesLength()numDims * bytesPerDim -
packedIndexBytesLength
public int packedIndexBytesLength()numIndexDims * bytesPerDim -
bytesPerDoc
public int bytesPerDoc()(numDims * bytesPerDim) + Integer.BYTES (packedBytesLength plus docID size) -
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. All components in this record class are compared with '=='. -
numDims
public int numDims()Returns the value of thenumDimsrecord component.- Returns:
- the value of the
numDimsrecord component
-
numIndexDims
public int numIndexDims()Returns the value of thenumIndexDimsrecord component.- Returns:
- the value of the
numIndexDimsrecord component
-
bytesPerDim
public int bytesPerDim()Returns the value of thebytesPerDimrecord component.- Returns:
- the value of the
bytesPerDimrecord component
-
maxPointsInLeafNode
public int maxPointsInLeafNode()Returns the value of themaxPointsInLeafNoderecord component.- Returns:
- the value of the
maxPointsInLeafNoderecord component
-