A class that represents an R-tree. More...
#include <Index.h>
Public Types | |
typedef NodeType::BranchType | BranchType |
typedef Node< DATATYPE, MAXNODES, MINNODES > | NodeType |
typedef te::sam::rtree::PartitionVars< BranchType, MAXNODES > | PartitionVarsType |
Public Member Functions | |
void | clear (void) |
const te::gm::Envelope & | getMBR (void) const |
It returns the bounding box of all elements in the tree. More... | |
Index () | |
Constructor. More... | |
Index (const te::gm::Envelope &mbr) | |
Constructor. More... | |
void | insert (const te::gm::Envelope &mbr, const DATATYPE &data) |
It inserts an item into the tree. More... | |
bool | isEmpty (void) const |
It returns true if the tree is empty. More... | |
bool | remove (const te::gm::Envelope &mbr, const DATATYPE &data) |
It removes an item from the tree. More... | |
int | search (const te::gm::Envelope &mbr, std::vector< DATATYPE > &report) const |
Range search query. More... | |
void | setMBR (const te::gm::Envelope &mbr) |
It sets the bounding box of all elements in the tree. More... | |
std::size_t | size (void) const |
It returns the number of elements in the tree. More... | |
~Index () | |
Destructor. More... | |
Protected Member Functions | |
bool | addBranch (BranchType *branch, NodeType *node, NodeType **newNode) const |
Add a branch to a node. More... | |
bool | chooseLeaf (const te::gm::Envelope &mbr, const DATATYPE &data, NodeType *node, NodeType **newNode, int level) |
It inserts a new data rectangle into the index structure. More... | |
void | classify (int i, int group, PartitionVarsType &p) const |
te::gm::Envelope | combineRect (const te::gm::Envelope &mbrA, const te::gm::Envelope &mbrB) const |
Combine two rectangles into larger one containing both. More... | |
void | disconBranch (NodeType *n, int i) |
It disconnects a dependent node. More... | |
void | erase (NodeType *node) |
Erases a node from the tree and all nodes below it. More... | |
void | getBranches (NodeType *n, BranchType *b, PartitionVarsType &p) const |
bool | insert (const te::gm::Envelope &mbr, const DATATYPE &data, NodeType **root, int level) |
It inserts a data rectangle into an index structure. More... | |
void | loadNodes (NodeType *n, NodeType *q, PartitionVarsType &p) const |
void | methodZero (PartitionVarsType &p) const |
te::gm::Envelope | nodeCover (NodeType *n) const |
Find the smallest rectangle that includes all rectangles in branches of a node. More... | |
int | pickBranch (const te::gm::Envelope &mbr, NodeType *node) const |
Pick a branch. More... | |
void | pickSeeds (PartitionVarsType &p) const |
void | pigeonhole (PartitionVarsType &p) const |
bool | remove (const te::gm::Envelope &mbr, const DATATYPE &data, NodeType **root) |
It deletes a data rectangle from an index structure. More... | |
bool | remove2 (const te::gm::Envelope &mbr, const DATATYPE &data, NodeType *n, std::vector< NodeType *> &ee) |
It deletes a rectangle from non-root part of an index structure. More... | |
void | search (const te::gm::Envelope &mbr, NodeType *node, std::vector< DATATYPE > &report, int &foundObjs) const |
Recursive range query. More... | |
void | splitNode (NodeType *node, BranchType *branch, NodeType **newNode) const |
Split a node. More... | |
Private Member Functions | |
Index (const Index &rhs) | |
No copy constructor allowed. More... | |
Index & | operator= (const Index &rhs) |
No assignment operator allowed. More... | |
Private Attributes | |
te::gm::Envelope | m_mbr |
Bounding box of the tree. More... | |
NodeType * | m_root |
Pointer to the root node. More... | |
std::size_t | m_size |
The size of R-Tree (number of nodes). More... | |
A class that represents an R-tree.
This implementation is based on:
Antonin Guttman. R-Trees: A Dynamic Index Structure for Spatial Searching. ACM SIGMOD: International Conference on Management of Data, 1984, pp. 47-57.
and in his original source code.
typedef NodeType::BranchType te::sam::rtree::Index< DATATYPE, MAXNODES, MINNODES >::BranchType |
typedef Node<DATATYPE, MAXNODES, MINNODES> te::sam::rtree::Index< DATATYPE, MAXNODES, MINNODES >::NodeType |
typedef te::sam::rtree::PartitionVars<BranchType, MAXNODES> te::sam::rtree::Index< DATATYPE, MAXNODES, MINNODES >::PartitionVarsType |
|
inline |
|
inline |
|
inline |
|
private |
No copy constructor allowed.
rhs | The other rtree. |
|
inlineprotected |
|
protected |
|
inlineprotected |
|
inline |
|
inlineprotected |
|
protected |
|
inlineprotected |
|
inlineprotected |
|
inline |
|
inline |
|
inlineprotected |
|
inline |
|
inlineprotected |
|
inlineprotected |
|
protected |
|
private |
No assignment operator allowed.
rhs | The other rtree. |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inline |
|
inlineprotected |
|
inlineprotected |
|
inline |
|
protected |
|
inline |
|
inline |
|
inlineprotected |
|
private |
|
private |
|
mutableprivate |