java.io.Serializable
public abstract class AbstractSTRtree
extends java.lang.Object
implements java.io.Serializable
This implementation is based on Boundable
s rather than AbstractNode
s,
because the STR algorithm operates on both nodes and
data, both of which are treated as Boundables.
This class is thread-safe. Building the tree is synchronized, and querying is stateless.
STRtree
,
SIRtree
,
Serialized FormConstructor | Description |
---|---|
AbstractSTRtree() |
Constructs an AbstractSTRtree with the
default node capacity.
|
AbstractSTRtree(int nodeCapacity) |
Constructs an AbstractSTRtree with the specified maximum number of child
nodes that a node may have
|
Modifier and Type | Method | Description |
---|---|---|
void |
build() |
Creates parent nodes, grandparent nodes, and so forth up to the root
node, for the data that has been inserted into the tree.
|
int |
getNodeCapacity() |
Returns the maximum number of child nodes that a node may have
|
AbstractNode |
getRoot() |
|
boolean |
isEmpty() |
Tests whether the index contains any items.
|
java.util.List |
itemsTree() |
Gets a tree structure (as a nested list)
corresponding to the structure of the items and nodes in this tree.
|
public AbstractSTRtree()
public AbstractSTRtree(int nodeCapacity)
nodeCapacity
- the maximum number of child nodes in a nodepublic void build()
public AbstractNode getRoot()
public int getNodeCapacity()
public boolean isEmpty()
public java.util.List itemsTree()
The returned List
s contain either Object
items,
or Lists which correspond to subtrees of the tree
Subtrees which do not contain any items are not included.
Builds the tree if necessary.
Copyright © 2018. All rights reserved.