BKDConfig (Lucene 10.5.0 core API)
Description: declaration: package: org.apache.lucene.util.bkd, record: BKDConfig

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) node
  `numIndexDims` - How many dimensions we are indexing in the internal nodes
  `bytesPerDim` - 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

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `DEFAULT_MAX_POINTS_IN_LEAF_NODE`
  Default maximum number of point in each leaf block
  `static final int`
  `MAX_DIMS`
  Maximum number of index dimensions (2 * max index dimensions)
  `static final int`
  `MAX_INDEX_DIMS`
  Maximum number of index dimensions

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BKDConfig(int numDims, int numIndexDims, int bytesPerDim, int maxPointsInLeafNode)`
  Creates an instance of a `BKDConfig` record class.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `bytesPerDim()`
  Returns the value of the `bytesPerDim` record component.
  `int`
  `bytesPerDoc()`
  (numDims * bytesPerDim) + Integer.BYTES (packedBytesLength plus docID size)
  `final boolean`
  `equals(Object o)`
  Indicates whether some other object is "equal to" this one.
  `final int`
  `hashCode()`
  Returns a hash code value for this object.
  `int`
  `maxPointsInLeafNode()`
  Returns the value of the `maxPointsInLeafNode` record component.
  `int`
  `numDims()`
  Returns the value of the `numDims` record component.
  `int`
  `numIndexDims()`
  Returns the value of the `numIndexDims` record component.
  `static BKDConfig`
  `of(int numDims, int numIndexDims, int bytesPerDim, int maxPointsInLeafNode)`
  `int`
  `packedBytesLength()`
  numDims * bytesPerDim
  `int`
  `packedIndexBytesLength()`
  numIndexDims * bytesPerDim
  `final String`
  `toString()`
  Returns a string representation of this record class.

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### DEFAULT_MAX_POINTS_IN_LEAF_NODE

    public static final int DEFAULT_MAX_POINTS_IN_LEAF_NODE
    Default maximum number of point in each leaf block
    See Also:
      - Constant Field Values

  - ### MAX_DIMS

    public static final int MAX_DIMS
    Maximum number of index dimensions (2 * max index dimensions)
    See Also:
      - Constant Field Values

  - ### MAX_INDEX_DIMS

    public static final int MAX_INDEX_DIMS
    Maximum number of index dimensions
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### BKDConfig

    public BKDConfig(int numDims, int numIndexDims, int bytesPerDim, int maxPointsInLeafNode)
    Creates an instance of a `BKDConfig` record class.
    Parameters:
      `numDims` - the value for the `numDims` record component
      `numIndexDims` - the value for the `numIndexDims` record component
      `bytesPerDim` - the value for the `bytesPerDim` record component
      `maxPointsInLeafNode` - the value for the `maxPointsInLeafNode` record component

- ## Method Details

  - ### of

    public static BKDConfig of(int numDims, int numIndexDims, int bytesPerDim, int maxPointsInLeafNode)

  - ### 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

    public final String 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.
    Specified by:
      `toString` in class `Record`
    Returns:
      a string representation of this object

  - ### 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.
    Specified by:
      `hashCode` in class `Record`
    Returns:
      a hash code value for this object

  - ### equals

    public final boolean equals(Object o)
    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 '=='.
    Specified by:
      `equals` in class `Record`
    Parameters:
      `o` - the object with which to compare
    Returns:
      `true` if this object is the same as the `o` argument; `false` otherwise.

  - ### numDims

    public int numDims()
    Returns the value of the `numDims` record component.
    Returns:
      the value of the `numDims` record component

  - ### numIndexDims

    public int numIndexDims()
    Returns the value of the `numIndexDims` record component.
    Returns:
      the value of the `numIndexDims` record component

  - ### bytesPerDim

    public int bytesPerDim()
    Returns the value of the `bytesPerDim` record component.
    Returns:
      the value of the `bytesPerDim` record component

  - ### maxPointsInLeafNode

    public int maxPointsInLeafNode()
    Returns the value of the `maxPointsInLeafNode` record component.
    Returns:
      the value of the `maxPointsInLeafNode` record component