|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.knime.base.util.kdtree.NearestNeighbour<T>
T - the type of the data object associated with the patternpublic class NearestNeighbour<T>
This class represents a nearest neighbour found during the search.
| Constructor Summary | |
|---|---|
NearestNeighbour(T data,
double distance)
Creates a new nearest neighbour. |
|
| Method Summary | |
|---|---|
int |
compareTo(NearestNeighbour<T> o)
|
T |
getData()
Returns the data associated with the pattern. |
double |
getDistance()
Returns the distance from the query pattern. |
(package private) void |
setDistance(double newDistance)
Sets the distance of this nearest neighbour. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
NearestNeighbour(T data,
double distance)
data - the data, can be nulldistance - the distance from the query pattern| Method Detail |
|---|
public T getData()
nullpublic double getDistance()
void setDistance(double newDistance)
newDistance - the new distancepublic int compareTo(NearestNeighbour<T> o)
compareTo in interface Comparable<NearestNeighbour<T>>public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||