Package org.apache.lucene.codecs.lucene99

## Class OffHeapQuantizedByteVectorValues

- java.lang.Object
- - org.apache.lucene.search.DocIdSetIterator
  - - org.apache.lucene.index.ByteVectorValues
    - - org.apache.lucene.util.quantization.QuantizedByteVectorValues
      - - org.apache.lucene.codecs.lucene99.OffHeapQuantizedByteVectorValues

- All Implemented Interfaces:
    `RandomAccessVectorValues<byte[]>`, `RandomAccessQuantizedByteVectorValues`
  Direct Known Subclasses:
    `OffHeapQuantizedByteVectorValues.DenseOffHeapVectorValues`

      public abstract class OffHeapQuantizedByteVectorValues
      extends QuantizedByteVectorValues
      implements RandomAccessQuantizedByteVectorValues

  Read the quantized vector values and their score correction values from the index input. This supports both iterated and random access.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `OffHeapQuantizedByteVectorValues.DenseOffHeapVectorValues` | Dense vector values that are stored off-heap.

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected byte[]` | `binaryValue` |
    `protected ByteBuffer` | `byteBuffer` |
    `protected int` | `byteSize` |
    `protected int` | `dimension` |
    `protected int` | `lastOrd` |
    `protected float[]` | `scoreCorrectionConstant` |
    `protected int` | `size` |
    `protected IndexInput` | `slice` |

    - ### Fields inherited from class org.apache.lucene.search.DocIdSetIterator

      `NO_MORE_DOCS`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `int` | `dimension()` | Return the dimension of the vectors
    `float` | `getScoreCorrectionConstant()` |
    `static OffHeapQuantizedByteVectorValues` | `load​(OrdToDocDISIReaderConfiguration configuration, int dimension, int size, long quantizedVectorDataOffset, long quantizedVectorDataLength, IndexInput vectorData)` |
    `int` | `size()` | Return the number of vectors for this field.
    `byte[]` | `vectorValue​(int targetOrd)` | Return the vector value indexed at the given ordinal.

    - ### Methods inherited from class org.apache.lucene.index.ByteVectorValues

      `cost, vectorValue`

    - ### Methods inherited from class org.apache.lucene.search.DocIdSetIterator

      `advance, all, docID, empty, nextDoc, range, slowAdvance`

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.apache.lucene.util.quantization.RandomAccessQuantizedByteVectorValues

      `copy`

    - ### Methods inherited from interface org.apache.lucene.util.hnsw.RandomAccessVectorValues

      `getAcceptOrds, ordToDoc`

- - ### Field Detail

    - #### dimension

          protected final int dimension

    - #### size

          protected final int size

    - #### slice

          protected final IndexInput slice

    - #### binaryValue

          protected final byte[] binaryValue

    - #### byteBuffer

          protected final ByteBuffer byteBuffer

    - #### byteSize

          protected final int byteSize

    - #### lastOrd

          protected int lastOrd

    - #### scoreCorrectionConstant

          protected final float[] scoreCorrectionConstant

  - ### Method Detail

    - #### dimension

          public int dimension()

      Description copied from class: `ByteVectorValues`
      Return the dimension of the vectors
      Specified by:
        `dimension` in interface `RandomAccessVectorValues<byte[]>`
      Specified by:
        `dimension` in class `ByteVectorValues`

    - #### size

          public int size()

      Description copied from class: `ByteVectorValues`
      Return the number of vectors for this field.
      Specified by:
        `size` in interface `RandomAccessVectorValues<byte[]>`
      Specified by:
        `size` in class `ByteVectorValues`
      Returns:
        the number of vectors returned by this iterator

    - #### vectorValue

          public byte[] vectorValue​(int targetOrd)
                             throws IOException

      Description copied from interface: `RandomAccessVectorValues`
      Return the vector value indexed at the given ordinal.
      Specified by:
        `vectorValue` in interface `RandomAccessVectorValues<byte[]>`
      Parameters:
        `targetOrd` - a valid ordinal, ≥ 0 and < `RandomAccessVectorValues.size()`.
      Throws:
        `IOException`

    - #### getScoreCorrectionConstant

          public float getScoreCorrectionConstant()

      Specified by:
        `getScoreCorrectionConstant` in interface `RandomAccessQuantizedByteVectorValues`
      Specified by:
        `getScoreCorrectionConstant` in class `QuantizedByteVectorValues`

    - #### load

          public static OffHeapQuantizedByteVectorValues load​(OrdToDocDISIReaderConfiguration configuration,
                                                              int dimension,
                                                              int size,
                                                              long quantizedVectorDataOffset,
                                                              long quantizedVectorDataLength,
                                                              IndexInput vectorData)
                                                       throws IOException

      Throws:
        `IOException`