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