Record Class FloatPointNearestNeighbor.Cell

java.lang.Object
java.lang.Record
org.apache.lucene.sandbox.document.FloatPointNearestNeighbor.Cell
Record Components:
distanceSquared - The closest possible distance^2 of all points in this cell
All Implemented Interfaces:
Comparable<FloatPointNearestNeighbor.Cell>
Enclosing class:
FloatPointNearestNeighbor

static record FloatPointNearestNeighbor.Cell(PointValues.PointTree index, int readerIndex, byte[] minPacked, byte[] maxPacked, double distanceSquared) extends Record implements Comparable<FloatPointNearestNeighbor.Cell>
  • Field Details

    • index

      private final PointValues.PointTree index
      The field for the index record component.
    • readerIndex

      private final int readerIndex
      The field for the readerIndex record component.
    • minPacked

      private final byte[] minPacked
      The field for the minPacked record component.
    • maxPacked

      private final byte[] maxPacked
      The field for the maxPacked record component.
    • distanceSquared

      private final double distanceSquared
      The field for the distanceSquared record component.
  • Constructor Details

    • Cell

      Cell(PointValues.PointTree index, int readerIndex, byte[] minPacked, byte[] maxPacked, double distanceSquared)
      Creates an instance of a Cell record class.
      Parameters:
      index - the value for the index record component
      readerIndex - the value for the readerIndex record component
      minPacked - the value for the minPacked record component
      maxPacked - the value for the maxPacked record component
      distanceSquared - the value for the distanceSquared record component
  • Method Details

    • compareTo

      public int compareTo(FloatPointNearestNeighbor.Cell other)
      Specified by:
      compareTo in interface Comparable<FloatPointNearestNeighbor.Cell>
    • toString

      public 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. Reference components are compared with Objects::equals(Object,Object); primitive components 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.
    • index

      public PointValues.PointTree index()
      Returns the value of the index record component.
      Returns:
      the value of the index record component
    • readerIndex

      public int readerIndex()
      Returns the value of the readerIndex record component.
      Returns:
      the value of the readerIndex record component
    • minPacked

      public byte[] minPacked()
      Returns the value of the minPacked record component.
      Returns:
      the value of the minPacked record component
    • maxPacked

      public byte[] maxPacked()
      Returns the value of the maxPacked record component.
      Returns:
      the value of the maxPacked record component
    • distanceSquared

      public double distanceSquared()
      Returns the value of the distanceSquared record component.
      Returns:
      the value of the distanceSquared record component