public class PHTreeP<T> extends Object implements PointIndex<T>
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear all entries.
|
static <T> PHTreeP<T> |
createPHTree(int dims) |
int |
getDepth() |
int |
getDims() |
int |
getNodeCount() |
Object |
getStats() |
void |
insert(double[] key,
T value)
Insert a point.
|
QueryIterator<PointEntry<T>> |
iterator() |
QueryIterator<PointEntry<T>> |
query(double[] min,
double[] max) |
T |
queryExact(double[] point)
Lookup an entry, using exact match.
|
QueryIteratorKNN<PointEntryDist<T>> |
queryKNN(double[] center,
int k)
Finds the nearest neighbor.
|
T |
remove(double[] point)
Remove a point entry.
|
int |
size() |
String |
toStringTree() |
T |
update(double[] oldPoint,
double[] newPoint)
Update the position of an entry.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitquery1NNpublic static <T> PHTreeP<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[] key,
T value)
PointIndexinsert in interface PointIndex<T>key - pointvalue - valuepublic T remove(double[] point)
PointIndexremove in interface PointIndex<T>point - the pointpublic T update(double[] oldPoint, double[] newPoint)
PointIndexupdate in interface PointIndex<T>oldPoint - old positionnewPoint - new positionpublic T queryExact(double[] point)
PointIndexqueryExact in interface PointIndex<T>point - the pointpublic QueryIterator<PointEntry<T>> query(double[] min, double[] max)
query in interface PointIndex<T>public QueryIterator<PointEntry<T>> iterator()
iterator in interface PointIndex<T>public QueryIteratorKNN<PointEntryDist<T>> queryKNN(double[] center, int k)
PointIndexqueryKNN in interface PointIndex<T>center - center pointk - number of neighborsCopyright © 2017. All rights reserved.