public class SquaredEuclideanFunction extends VectorDistanceFunction
Modifier and Type | Field and Description |
---|---|
protected String |
name |
oneOverPower, power, source1, source2
Constructor and Description |
---|
SquaredEuclideanFunction(MultiValueSource source1,
MultiValueSource source2) |
Modifier and Type | Method and Description |
---|---|
protected double |
distance(int doc,
FunctionValues dv1,
FunctionValues dv2)
Calculate the distance
|
boolean |
equals(Object o) |
int |
hashCode() |
protected String |
name() |
createWeight, description, distSquaredCartesian, getValues, vectorDistance, vectorDistance
getSortField, newContext, toString
protected String name
public SquaredEuclideanFunction(MultiValueSource source1, MultiValueSource source2)
protected String name()
name
in class VectorDistanceFunction
protected double distance(int doc, FunctionValues dv1, FunctionValues dv2)
VectorDistanceFunction
distance
in class VectorDistanceFunction
doc
- The doc to scoredv1
- The values from the first MultiValueSourcedv2
- The values from the second MultiValueSourcepublic boolean equals(Object o)
equals
in class VectorDistanceFunction
public int hashCode()
hashCode
in class VectorDistanceFunction
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.