MVRTreeMap

An r-tree implementation. It supports both the linear and the quadratic split algorithm.

Methods
static MVRTreeMap create(int dimensions, DataType valueType)
Create a new map with the given dimensions and value type.
static MVRTreeMap create(int dimensions, DataType valueType)
Create a new map with the given dimensions and value type.
Parameters:
dimensions - the number of dimensions
valueType - the value type
Returns:
the map
void add(SpatialKey key, V value)
Add a given key-value pair.
void add(SpatialKey key, V value)
Add a given key-value pair. The key should not exist (if it exists, the result is undefined).
Parameters:
key - the key
value - the value
void addNodeKeys(ArrayList list, Page p)
Add all node keys (including internal bounds) to the given list.
void addNodeKeys(ArrayList list, Page p)
Add all node keys (including internal bounds) to the given list. This is mainly used to visualize the internal splits.
Parameters:
list - the list
p - the root page
MVRTreeMap.RTreeCursor findContainedKeys(SpatialKey x)
Iterate over all keys that are fully contained within the given rectangle.
MVRTreeMap.RTreeCursor findContainedKeys(SpatialKey x)
Iterate over all keys that are fully contained within the given rectangle.
Parameters:
x - the rectangle
Returns:
the iterator
MVRTreeMap.RTreeCursor findIntersectingKeys(SpatialKey x)
Iterate over all keys that have an intersection with the given rectangle.
MVRTreeMap.RTreeCursor findIntersectingKeys(SpatialKey x)
Iterate over all keys that have an intersection with the given rectangle.
Parameters:
x - the rectangle
Returns:
the iterator
V get(Object key)
V get(Object key)
Object get(Page p, Object key)
Get the object for the given key.
Object get(Page p, Object key)
Get the object for the given key. An exact match is required.
Parameters:
p - the page
key - the key
Returns:
the value, or null if not found
int getChildPageCount(Page p)
int getChildPageCount(Page p)
String getType()
String getType()
boolean isQuadraticSplit()
boolean isQuadraticSplit()
V put(SpatialKey key, V value)
V put(SpatialKey key, V value)
Object remove(Page p, long writeVersion, Object key)
Object remove(Page p, long writeVersion, Object key)
void setQuadraticSplit(boolean quadraticSplit)
void setQuadraticSplit(boolean quadraticSplit)

Fields
static SpatialDataType keyType

keyType

The spatial key type.