public class PHTreeR<T> extends Object implements RectangleIndex<T>
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear all entries.
|
static <T> PHTreeR<T> |
createPHTree(int dims) |
int |
getDepth() |
int |
getDims() |
int |
getNodeCount() |
Object |
getStats() |
void |
insert(double[] lower,
double[] upper,
T value)
Insert a rectangle.
|
QueryIterator<RectangleEntry<T>> |
iterator() |
T |
queryExact(double[] lower,
double[] upper)
Lookup an entry, using exact match.
|
QueryIterator<RectangleEntry<T>> |
queryIntersect(double[] min,
double[] max) |
QueryIteratorKNN<RectangleEntryDist<T>> |
queryKNN(double[] center,
int k)
Finds the nearest neighbor.
|
T |
remove(double[] lower,
double[] upper)
Remove an entry.
|
int |
size() |
String |
toStringTree() |
T |
update(double[] lo1,
double[] up1,
double[] lo2,
double[] up2)
Update the position of an entry.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitquery1NNpublic static <T> PHTreeR<T> createPHTree(int dims)
public int getDims()
public void clear()
Indexpublic int getNodeCount()
getNodeCount in interface Index<T>public String toStringTree()
toStringTree in interface Index<T>public void insert(double[] lower,
double[] upper,
T value)
RectangleIndexinsert in interface RectangleIndex<T>lower - minimum cornerupper - maximum cornervalue - valuepublic T remove(double[] lower, double[] upper)
RectangleIndexremove in interface RectangleIndex<T>lower - minimum cornerupper - maximum cornerpublic T update(double[] lo1, double[] up1, double[] lo2, double[] up2)
RectangleIndexupdate in interface RectangleIndex<T>lo1 - old minup1 - old maxlo2 - new minup2 - new maxpublic T queryExact(double[] lower, double[] upper)
RectangleIndexqueryExact in interface RectangleIndex<T>lower - minimum cornerupper - maximum cornerpublic QueryIterator<RectangleEntry<T>> iterator()
iterator in interface RectangleIndex<T>public QueryIterator<RectangleEntry<T>> queryIntersect(double[] min, double[] max)
queryIntersect in interface RectangleIndex<T>public QueryIteratorKNN<RectangleEntryDist<T>> queryKNN(double[] center, int k)
RectangleIndexqueryKNN in interface RectangleIndex<T>center - center pointk - number of neighborsCopyright © 2017. All rights reserved.