T - public class QuadTreeRKD<T> extends Object implements RectangleIndex<T>
| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEBUG |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Removes all elements from the tree.
|
boolean |
containsExact(double[] keyL,
double[] keyU)
Check whether a given key exists.
|
static <T> QuadTreeRKD<T> |
create(int dims) |
static <T> QuadTreeRKD<T> |
create(int dims,
int maxNodeSize)
Deprecated.
|
static <T> QuadTreeRKD<T> |
create(int dims,
int maxNodeSize,
double[] center,
double radius) |
static <T> QuadTreeRKD<T> |
create(int dims,
int maxNodeSize,
double[] min,
double[] max) |
int |
getDepth() |
int |
getDims() |
int |
getNodeCount() |
protected QRNode<T> |
getRoot() |
QuadTreeKD.QStats |
getStats() |
void |
insert(double[] keyL,
double[] keyU,
T value)
Insert a key-value pair.
|
QueryIterator<RectangleEntry<T>> |
iterator() |
List<QREntryDist<T>> |
knnQuery(double[] center,
int k) |
T |
queryExact(double[] keyL,
double[] keyU)
Get the value associates with the key.
|
QRIterator<T> |
queryIntersect(double[] min,
double[] max)
Query the tree, returning all points in the axis-aligned rectangle between 'min' and 'max'.
|
org.tinspin.index.qthypercube.QuadTreeRKD.QRQueryIteratorKNN |
queryKNN(double[] center,
int k)
Finds the nearest neighbor.
|
T |
remove(double[] keyL,
double[] keyU)
Remove a key.
|
int |
size()
Get the number of key-value pairs in the tree.
|
String |
toString() |
String |
toStringTree()
Returns a printable list of the tree.
|
T |
update(double[] oldKeyL,
double[] oldKeyU,
double[] newKeyL,
double[] newKeyU)
Reinsert the key.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitquery1NNpublic static final boolean DEBUG
public static <T> QuadTreeRKD<T> create(int dims)
@Deprecated public static <T> QuadTreeRKD<T> create(int dims, int maxNodeSize)
public static <T> QuadTreeRKD<T> create(int dims, int maxNodeSize, double[] min, double[] max)
public static <T> QuadTreeRKD<T> create(int dims, int maxNodeSize, double[] center, double radius)
public void insert(double[] keyL,
double[] keyU,
T value)
insert in interface RectangleIndex<T>keyL - the lower part of the keykeyU - the upper part of the keyvalue - the valuepublic boolean containsExact(double[] keyL,
double[] keyU)
keyL - the lower key to checkkeyU - the upper key to checkpublic T queryExact(double[] keyL, double[] keyU)
queryExact in interface RectangleIndex<T>keyL - the lower key to look upkeyU - the upper key to look uppublic T remove(double[] keyL, double[] keyU)
remove in interface RectangleIndex<T>keyL - key to removekeyU - key to removepublic T update(double[] oldKeyL, double[] oldKeyU, double[] newKeyL, double[] newKeyU)
update in interface RectangleIndex<T>oldKeyL - old keyoldKeyU - old keynewKeyL - new keynewKeyU - new keypublic int size()
public void clear()
public QRIterator<T> queryIntersect(double[] min, double[] max)
queryIntersect in interface RectangleIndex<T>min - lower left corner of querymax - upper right corner of querypublic List<QREntryDist<T>> knnQuery(double[] center, int k)
public String toStringTree()
toStringTree in interface Index<T>public QuadTreeKD.QStats getStats()
public int getDims()
public int getNodeCount()
getNodeCount in interface Index<T>public QueryIterator<RectangleEntry<T>> iterator()
iterator in interface RectangleIndex<T>public org.tinspin.index.qthypercube.QuadTreeRKD.QRQueryIteratorKNN queryKNN(double[] center,
int k)
RectangleIndexqueryKNN in interface RectangleIndex<T>center - center pointk - number of neighborsCopyright © 2017. All rights reserved.