Interface RandomAccessVectorValues


  • public interface RandomAccessVectorValues
    Provides random access to vectors by dense ordinal.
    WARNING: This API is experimental and might change in incompatible ways in the next release.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      BytesRef binaryValue​(int targetOrd)
      Return the vector indexed at the given ordinal value as an array of bytes in a BytesRef; these are the bytes corresponding to the float array.
      int dimension()
      Return the dimension of the returned vector values
      int size()
      Return the number of vector values
      float[] vectorValue​(int targetOrd)
      Return the vector value indexed at the given ordinal.
    • Method Detail

      • size

        int size()
        Return the number of vector values
      • dimension

        int dimension()
        Return the dimension of the returned vector values
      • vectorValue

        float[] vectorValue​(int targetOrd)
                     throws IOException
        Return the vector value indexed at the given ordinal. The provided floating point array may be shared and overwritten by subsequent calls to this method and binaryValue(int).
        Parameters:
        targetOrd - a valid ordinal, ≥ 0 and < size().
        Throws:
        IOException
      • binaryValue

        BytesRef binaryValue​(int targetOrd)
                      throws IOException
        Return the vector indexed at the given ordinal value as an array of bytes in a BytesRef; these are the bytes corresponding to the float array. The provided bytes may be shared and overwritten by subsequent calls to this method and vectorValue(int).
        Parameters:
        targetOrd - a valid ordinal, ≥ 0 and < size().
        Throws:
        IOException