
E - content of the indexpublic interface SpatialIndex<E> extends Serializable
| Modifier and Type | Method and Description |
|---|---|
int |
getDimensions() |
void |
insert(E element,
double... position)
Inserts an element in the
SpatialIndex. |
boolean |
move(E element,
double[] start,
double[] end)
If an element is moved, updates the
SpatialIndex accordingly. |
List<E> |
query(double[]... parallelotope)
Queries the
SpatialIndex, searching for elements in a
parallelotope. |
boolean |
remove(E element,
double... position)
Deletes an element from the
SpatialIndex. |
void insert(E element, double... position)
SpatialIndex.element - The element to addposition - the coordinates where the element should be addedboolean remove(E element, double... position)
SpatialIndex.element - The element to addposition - the coordinates where the element should be addedboolean move(E element, double[] start, double[] end)
SpatialIndex accordingly.element - The element to addstart - the coordinates where the element is currently locatedend - the coordinates where the element is should be movedList<E> query(double[]... parallelotope)
SpatialIndex, searching for elements in a
parallelotope. "Parallelotope" is a fancy word for
"N-dimensional rectangle". A 2-parallelotope is in fact a rectangle, a
3-parallelotope is a parallelepiped, and so on.parallelotope - the space where to search for elementsSpatialIndex.int getDimensions()
SpatialIndex.