public class PointArray<T> extends Object implements PointIndex<T>
| Constructor and Description |
|---|
PointArray(int dims,
int size)
Setup of an simple array data structure (no indexing).
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear all entries.
|
int |
getDepth() |
int |
getDims() |
int |
getNodeCount() |
Stats |
getStats() |
void |
insert(double[] key,
T value)
Insert a point.
|
QueryIterator<? extends PointEntry<T>> |
iterator() |
org.tinspin.index.array.PointArray.AQueryIterator |
query(double[] min,
double[] max) |
T |
queryExact(double[] point)
Lookup an entry, using exact match.
|
org.tinspin.index.array.PointArray.AQueryIteratorKNN |
queryKNN(double[] center,
int k)
Finds the nearest neighbor.
|
T |
remove(double[] point)
Remove a point entry.
|
int |
size() |
String |
toString() |
String |
toStringTree() |
T |
update(double[] oldPoint,
double[] newPoint)
Update the position of an entry.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitquery1NNpublic PointArray(int dims,
int size)
dims - dimensionssize - sizepublic void insert(double[] key,
T value)
PointIndexinsert in interface PointIndex<T>key - pointvalue - valuepublic T queryExact(double[] point)
PointIndexqueryExact in interface PointIndex<T>point - the pointpublic org.tinspin.index.array.PointArray.AQueryIterator query(double[] min,
double[] max)
query in interface PointIndex<T>min - Lower left corner of the query windowmax - Upper right corner of the query windowpublic QueryIterator<? extends PointEntry<T>> iterator()
iterator in interface PointIndex<T>public org.tinspin.index.array.PointArray.AQueryIteratorKNN queryKNN(double[] center,
int k)
PointIndexqueryKNN in interface PointIndex<T>center - center pointk - number of neighborspublic T update(double[] oldPoint, double[] newPoint)
PointIndexupdate in interface PointIndex<T>oldPoint - old positionnewPoint - new positionpublic T remove(double[] point)
PointIndexremove in interface PointIndex<T>point - the pointpublic int getDims()
public void clear()
Indexpublic Stats getStats()
public int getNodeCount()
getNodeCount in interface Index<T>public String toStringTree()
toStringTree in interface Index<T>Copyright © 2018. All rights reserved.