|
JIGL v1.6 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--jigl.image.utils.KdTree
This class does kdTree operations. A KD Tree is a data structure that is used in computer science during orthogonal range searching. For instance, when you want to find the set of points that fall into a given rectangle in a plane, using KD Tree it is possible to find the resulting points in O(sqrt(n)+k) time where n is the number of points and k is the number of points in the result.
| Field Summary | |
private int |
determine
|
private int |
dimension
The number of dimensions |
private KdTree |
left
left branch of the tree |
private KdTree |
right
Right branch of the tree |
KdTree |
root
the root node of the tree |
private float[] |
value
value at the node |
Vector |
values
store the value of nearest neighbors |
| Constructor Summary | |
KdTree(int dimensions)
Construct a KdTree object with dimensions dimensions. |
|
| Method Summary | |
void |
addNode(float[] node,
KdTree tree)
Adds a node to the correct place in the KdTree |
void |
buildTreePalette(RealColorImage image)
Builds a KdTree from the colors in the image |
void |
findNearest(float[] node,
KdTree tree,
int threshold)
Finds the nearest neighbor of node. |
KdTree |
getLeft()
Returns the left child. |
KdTree |
getRight()
Returns the right child. |
float[] |
getValue()
Returns the value of the kdtree. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private int determine
private KdTree left
private KdTree right
private float[] value
private int dimension
public KdTree root
public Vector values
| Constructor Detail |
public KdTree(int dimensions)
dimensions.
| Method Detail |
public KdTree getLeft()
public KdTree getRight()
public float[] getValue()
public void findNearest(float[] node,
KdTree tree,
int threshold)
public void buildTreePalette(RealColorImage image)
public void addNode(float[] node,
KdTree tree)
|
JIGL v1.6 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||