T
- Type of object being compared.public abstract class ObjectNearestNeighbours<T> extends Object implements NearestNeighbours<T,float[],IntFloatPair>
DistanceComparator
.Modifier and Type | Field and Description |
---|---|
protected DistanceComparator<? super T> |
distance |
Constructor and Description |
---|
ObjectNearestNeighbours(DistanceComparator<? super T> distance)
Construct with the given distance measure
|
Modifier and Type | Method and Description |
---|---|
DistanceComparator<? super T> |
distanceComparator()
Get the distance comparator
|
static <T> float |
distanceFunc(DistanceComparator<? super T> distance,
T qu,
T pnt)
Static method to find a distance between a query vector and point.
|
protected DistanceComparator<? super T> distance
public ObjectNearestNeighbours(DistanceComparator<? super T> distance)
distance
- the distance measurepublic static <T> float distanceFunc(DistanceComparator<? super T> distance, T qu, T pnt)
T
- Type of object being compared.distance
- the distance measurequ
- The query vector.pnt
- The pointpublic DistanceComparator<? super T> distanceComparator()