|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmaspack.geometry.KDTree<T>
T
- public class KDTree<T>
Generic KD-Tree utility, requires a KDComparator for computing distances between elements. Used for finding nearest M neighbours of a supplied point in log(N) time.
Nested Class Summary | |
---|---|
static class |
KDTree.KDNode<T>
KD node associated with a node on a KD-Tree |
Constructor Summary | |
---|---|
KDTree(int dim,
java.util.List<T> list,
KDComparator<T> comp)
Default constructor. |
Method Summary | |
---|---|
boolean |
contains(T value)
Checks if the tree contains the supplied value |
java.util.ArrayList<T> |
nearestNeighbourSearch(T pnt,
int K,
double tol)
K Nearest Neighbour search |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public KDTree(int dim, java.util.List<T> list, KDComparator<T> comp)
Method Detail |
---|
public boolean contains(T value)
public java.util.ArrayList<T> nearestNeighbourSearch(T pnt, int K, double tol)
pnt
- point to find neighbors of.K
- Number of neighbors to retrieve. Can return more than K,
if last nodes are equal distances.tol
- tolerence for located neighbors
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |