Package org.apache.lucene.queries.function.valuesource

## Class ByteVectorSimilarityFunction

- java.lang.Object
- - org.apache.lucene.queries.function.ValueSource
  - - org.apache.lucene.queries.function.valuesource.VectorSimilarityFunction
    - - org.apache.lucene.queries.function.valuesource.ByteVectorSimilarityFunction

-     public class ByteVectorSimilarityFunction
      extends VectorSimilarityFunction

  `ByteVectorSimilarityFunction` returns a similarity function between two knn vectors with byte elements.

- - ### Field Summary

    - ### Fields inherited from class org.apache.lucene.queries.function.valuesource.VectorSimilarityFunction

      `similarityFunction, vector1, vector2`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ByteVectorSimilarityFunction​(VectorSimilarityFunction similarityFunction, ValueSource vector1, ValueSource vector2)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected float` | `func​(int doc, FunctionValues f1, FunctionValues f2)` |

    - ### Methods inherited from class org.apache.lucene.queries.function.valuesource.VectorSimilarityFunction

      `description, equals, getValues, hashCode`

    - ### Methods inherited from class org.apache.lucene.queries.function.ValueSource

      `asDoubleValuesSource, asLongValuesSource, createWeight, fromDoubleValuesSource, getSortField, newContext, toString`

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

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

- - ### Constructor Detail

    - #### ByteVectorSimilarityFunction

          public ByteVectorSimilarityFunction​(VectorSimilarityFunction similarityFunction,
                                              ValueSource vector1,
                                              ValueSource vector2)

  - ### Method Detail

    - #### func

          protected float func​(int doc,
                               FunctionValues f1,
                               FunctionValues f2)
                        throws IOException

      Specified by:
        `func` in class `VectorSimilarityFunction`
      Throws:
        `IOException`