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

# Class FloatVectorSimilarityFunction

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

public class FloatVectorSimilarityFunction extends VectorSimilarityFunction
`FloatVectorSimilarityFunction` returns a similarity function between two knn vectors with float elements.

## Field Summary

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

`similarityFunction, vector1, vector2`

## Constructor Summary

Constructors
Constructor
Description
`FloatVectorSimilarityFunction(VectorSimilarityFunction similarityFunction, ValueSource vector1, ValueSource vector2)`

## Method Summary

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 Details

### FloatVectorSimilarityFunction

public FloatVectorSimilarityFunction(VectorSimilarityFunction similarityFunction, ValueSource vector1, ValueSource vector2)

## Method Details

### func

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

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