public class RectArray<T> extends Object implements RectangleIndex<T>
| Constructor and Description |
|---|
RectArray(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[] lower,
double[] upper,
T value)
Insert a rectangle.
|
QueryIterator<RectangleEntry<T>> |
iterator() |
T |
queryExact(double[] lower,
double[] upper)
Lookup an entry, using exact match.
|
org.tinspin.index.array.RectArray.AQueryIterator |
queryIntersect(double[] min,
double[] max) |
org.tinspin.index.array.RectArray.AQueryIteratorKNN |
queryKNN(double[] center,
int k)
Finds the nearest neighbor.
|
T |
remove(double[] lower,
double[] upper)
Remove an entry.
|
int |
size() |
String |
toString() |
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, wait, wait, waitquery1NNpublic RectArray(int dims,
int size)
dims - dimensionssize - sizepublic void insert(double[] lower,
double[] upper,
T value)
RectangleIndexinsert in interface RectangleIndex<T>lower - minimum cornerupper - maximum cornervalue - valuepublic T queryExact(double[] lower, double[] upper)
RectangleIndexqueryExact in interface RectangleIndex<T>lower - minimum cornerupper - maximum cornerpublic org.tinspin.index.array.RectArray.AQueryIterator queryIntersect(double[] min,
double[] max)
queryIntersect in interface RectangleIndex<T>min - Lower left corner of the query windowmax - Upper right corner of the query windowpublic QueryIterator<RectangleEntry<T>> iterator()
iterator in interface RectangleIndex<T>public org.tinspin.index.array.RectArray.AQueryIteratorKNN queryKNN(double[] center,
int k)
RectangleIndexqueryKNN in interface RectangleIndex<T>center - center pointk - number of neighborspublic 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 remove(double[] lower, double[] upper)
RectangleIndexremove in interface RectangleIndex<T>lower - minimum cornerupper - maximum cornerpublic 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.