public class MXCIFQuadTree<L> extends Object
Quad tree.
Nodes can either be leaf nodes or branch nodes. Both leaf nodes and branch nodes have data. "Data" is modelled as a generic type.
Branch nodes have 4 regions or child nodes that subdivide the parent region in NW/NE/SW/SE.
The tree is polymorphic: leaf nodes can become branches and branches can become leafs.
Manipulation and querying of the quad tree is done through tool classes. As the tree can be polymorphic users should not hold on to the root node as it could change.
Constructor and Description |
---|
MXCIFQuadTree(int leafCapacity,
int maxTreeHeight,
MXCIFQuadTreeNode<L> root) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
int |
getLeafCapacity() |
int |
getMaxTreeHeight() |
MXCIFQuadTreeNode<L> |
getRoot() |
void |
setRoot(MXCIFQuadTreeNode<L> root) |
public MXCIFQuadTree(int leafCapacity, int maxTreeHeight, MXCIFQuadTreeNode<L> root)
public int getLeafCapacity()
public int getMaxTreeHeight()
public MXCIFQuadTreeNode<L> getRoot()
public void setRoot(MXCIFQuadTreeNode<L> root)
public void clear()