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 int
Default maximum number of point in each leaf blockstatic final int
Maximum number of index dimensions (2 * max index dimensions)static final int
Maximum number of index dimensions -
Constructor Summary
ConstructorsConstructorDescriptionBKDConfig
(int numDims, int numIndexDims, int bytesPerDim, int maxPointsInLeafNode) Creates an instance of aBKDConfig
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the value of thebytesPerDim
record component.int
(numDims * bytesPerDim) + Integer.BYTES (packedBytesLength plus docID size)final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
Returns the value of themaxPointsInLeafNode
record component.int
numDims()
Returns the value of thenumDims
record component.int
Returns the value of thenumIndexDims
record component.static BKDConfig
of
(int numDims, int numIndexDims, int bytesPerDim, int maxPointsInLeafNode) int
numDims * bytesPerDimint
numIndexDims * bytesPerDimfinal String
toString()
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 aBKDConfig
record class.- Parameters:
numDims
- the value for thenumDims
record componentnumIndexDims
- the value for thenumIndexDims
record componentbytesPerDim
- the value for thebytesPerDim
record componentmaxPointsInLeafNode
- the value for themaxPointsInLeafNode
record 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 thenumDims
record component.- Returns:
- the value of the
numDims
record component
-
numIndexDims
public int numIndexDims()Returns the value of thenumIndexDims
record component.- Returns:
- the value of the
numIndexDims
record component
-
bytesPerDim
public int bytesPerDim()Returns the value of thebytesPerDim
record component.- Returns:
- the value of the
bytesPerDim
record component
-
maxPointsInLeafNode
public int maxPointsInLeafNode()Returns the value of themaxPointsInLeafNode
record component.- Returns:
- the value of the
maxPointsInLeafNode
record component
-