Package org.apache.lucene.internal.vectorization

## Interface VectorUtilSupport

-     public interface VectorUtilSupport

  Interface for implementations of VectorUtil support.
  NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `float` | `cosine​(byte[] a, byte[] b)` | Returns the cosine similarity between the two byte vectors.
    `float` | `cosine​(float[] v1, float[] v2)` | Returns the cosine similarity between the two vectors.
    `int` | `dotProduct​(byte[] a, byte[] b)` | Returns the dot product computed over signed bytes.
    `float` | `dotProduct​(float[] a, float[] b)` | Calculates the dot product of the given float arrays.
    `int` | `squareDistance​(byte[] a, byte[] b)` | Returns the sum of squared differences of the two byte vectors.
    `float` | `squareDistance​(float[] a, float[] b)` | Returns the sum of squared differences of the two vectors.

- - ### Method Detail

    - #### dotProduct

          float dotProduct​(float[] a,
                           float[] b)

      Calculates the dot product of the given float arrays.

    - #### cosine

          float cosine​(float[] v1,
                       float[] v2)

      Returns the cosine similarity between the two vectors.

    - #### squareDistance

          float squareDistance​(float[] a,
                               float[] b)

      Returns the sum of squared differences of the two vectors.

    - #### dotProduct

          int dotProduct​(byte[] a,
                         byte[] b)

      Returns the dot product computed over signed bytes.

    - #### cosine

          float cosine​(byte[] a,
                       byte[] b)

      Returns the cosine similarity between the two byte vectors.

    - #### squareDistance

          int squareDistance​(byte[] a,
                             byte[] b)

      Returns the sum of squared differences of the two byte vectors.