public class AggregatingDistanceFunction extends java.lang.Object implements DistanceFunction
Modifier and Type | Field and Description |
---|---|
private AggregationFunction |
aggregator
The aggregation function used for computing the distance.
|
private static long |
serialVersionUID |
Constructor and Description |
---|
AggregatingDistanceFunction(AggregationFunction aggregator)
Creates a new distance function with the given aggregator.
|
Modifier and Type | Method and Description |
---|---|
double |
distance(java.util.List<java.lang.Double> l1,
java.util.List<java.lang.Double> l2)
Measures the distance between the two vectors.
|
boolean |
equals(java.lang.Object obj) |
int |
hashCode() |
java.lang.String |
toString() |
private static final long serialVersionUID
private AggregationFunction aggregator
public AggregatingDistanceFunction(AggregationFunction aggregator)
aggregator
- some aggregation function.public double distance(java.util.List<java.lang.Double> l1, java.util.List<java.lang.Double> l2)
DistanceFunction
distance
in interface DistanceFunction
l1
- some list of doubles.l2
- some list of doubles.public java.lang.String toString()
toString
in interface DistanceFunction
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object