Package org.apache.lucene.codecs.lucene99

## Class Lucene99ScalarQuantizedVectorsFormat

- java.lang.Object
- - org.apache.lucene.codecs.FlatVectorsFormat
  - - org.apache.lucene.codecs.lucene99.Lucene99ScalarQuantizedVectorsFormat

-     public final class Lucene99ScalarQuantizedVectorsFormat
      extends FlatVectorsFormat

  Format supporting vector quantization, storage, and retrieval
  WARNING: This API is experimental and might change in incompatible ways in the next release.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static String` | `QUANTIZED_VECTOR_COMPONENT` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Lucene99ScalarQuantizedVectorsFormat()` | Constructs a format using default graph construction parameters
    `Lucene99ScalarQuantizedVectorsFormat​(Float confidenceInterval)` | Constructs a format using the given graph construction parameters.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static float` | `calculateDefaultConfidenceInterval​(int vectorDimension)` |
    `FlatVectorsReader` | `fieldsReader​(SegmentReadState state)` | Returns a `KnnVectorsReader` to read the vectors from the index.
    `FlatVectorsWriter` | `fieldsWriter​(SegmentWriteState state)` | Returns a `FlatVectorsWriter` to write the vectors to the index.
    `String` | `toString()` |

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

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

- - ### Field Detail

    - #### QUANTIZED_VECTOR_COMPONENT

          public static final String QUANTIZED_VECTOR_COMPONENT

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### Lucene99ScalarQuantizedVectorsFormat

          public Lucene99ScalarQuantizedVectorsFormat()

      Constructs a format using default graph construction parameters

    - #### Lucene99ScalarQuantizedVectorsFormat

          public Lucene99ScalarQuantizedVectorsFormat​(Float confidenceInterval)

      Constructs a format using the given graph construction parameters.
      Parameters:
        `confidenceInterval` - the confidenceInterval for scalar quantizing the vectors, when `null` it is calculated based on the vector field dimensions.

  - ### Method Detail

    - #### calculateDefaultConfidenceInterval

          public static float calculateDefaultConfidenceInterval​(int vectorDimension)

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### fieldsWriter

          public FlatVectorsWriter fieldsWriter​(SegmentWriteState state)
                                         throws IOException

      Description copied from class: `FlatVectorsFormat`
      Returns a `FlatVectorsWriter` to write the vectors to the index.
      Specified by:
        `fieldsWriter` in class `FlatVectorsFormat`
      Throws:
        `IOException`

    - #### fieldsReader

          public FlatVectorsReader fieldsReader​(SegmentReadState state)
                                         throws IOException

      Description copied from class: `FlatVectorsFormat`
      Returns a `KnnVectorsReader` to read the vectors from the index.
      Specified by:
        `fieldsReader` in class `FlatVectorsFormat`
      Throws:
        `IOException`