|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--drasys.or.geom.KDTree
A K-Dimensional Tree implementation of a point index.
References:
Introduction to Algorithms
Thomas H. Cormen, et al / Hardcover / Published 1990
Constructor Summary | |
KDTree()
The first key added to the index will determine the coordinate system and dimensionality for the KDTree. |
|
KDTree(PriorityQueueI priorityQueue)
The first key added to the index will determine the coordinate system and dimensionality for the KDTree. |
Method Summary | |
CoordinateSystemI |
coordinateSystem()
Returns the coordinate system that the index is using. |
java.util.Enumeration |
elements()
Returns an enumeration to access all the elements in random order. |
java.lang.Object |
get(PointI point)
Returns an element with an exact key match. |
PairI |
getNearestNeighborTo(PointI point)
Returns the element with the nearest key. |
void |
put(PointI key,
java.lang.Object value)
Put a new element into the index. |
RangeI |
range()
Returns the range of points in the index. |
void |
removeAllElements()
Removes all of the elements from the index. |
java.util.Enumeration |
selectedElements()
Returns an enumeration to access the selected elements in random order. |
int |
selectNearestNeighbors(PointI point,
int n)
Select the 'n' elements whose keys are closest to 'point'. |
int |
selectRange(RangeI range)
Select the elements whose keys are in the range. |
void |
setCoordinateSystem(CoordinateSystemI coordinateSystem)
Sets the coordinate system for the index after first removing all the elements. |
int |
size()
Returns the number of elements selected in the index. |
int |
sizeOfSelected()
Returns the number of elements selected in the index. |
boolean |
supportsDuplicateKeys()
Returns true if the index can contain duplicate keys. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public KDTree()
public KDTree(PriorityQueueI priorityQueue)
Method Detail |
public int size()
public int sizeOfSelected()
public void removeAllElements()
public RangeI range()
public void setCoordinateSystem(CoordinateSystemI coordinateSystem)
public CoordinateSystemI coordinateSystem()
public boolean supportsDuplicateKeys()
public java.lang.Object get(PointI point)
public PairI getNearestNeighborTo(PointI point)
public int selectNearestNeighbors(PointI point, int n)
public java.util.Enumeration elements()
public java.util.Enumeration selectedElements()
public void put(PointI key, java.lang.Object value)
public int selectRange(RangeI range)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |