Implementation of an RTree with an R* index. More...
#include <RStarTree.h>
Classes | |
struct | QueryFunctor |
struct | RemoveFunctor |
struct | RemoveLeafFunctor |
struct | VisitFunctor |
Public Types | |
typedef RStarBoundedItem< dimensions > | BoundedItem |
typedef BoundedItem::BoundingBox | BoundingBox |
typedef RStarNode< BoundedItem > | Node |
typedef RStarLeaf< BoundedItem, LeafType > | Leaf |
typedef RStarAcceptOverlapping< Node, Leaf > | AcceptOverlapping |
typedef RStarAcceptEnclosing< Node, Leaf > | AcceptEnclosing |
typedef RStarAcceptAny< Node, Leaf > | AcceptAny |
typedef RStarRemoveLeaf< Leaf > | RemoveLeaf |
typedef RStarRemoveSpecificLeaf< Leaf > | RemoveSpecificLeaf |
Public Member Functions | |
RStarTree () | |
~RStarTree () | |
void | Insert (LeafType leaf, const BoundingBox &bound) |
template<typename Acceptor , typename Visitor > | |
Visitor | Query (const Acceptor &accept, Visitor visitor) |
Touches each node using the visitor pattern. More... | |
template<typename Acceptor , typename LeafRemover > | |
void | Remove (const Acceptor &accept, LeafRemover leafRemover) |
Removes item(s) from the tree. More... | |
void | RemoveBoundedArea (const BoundingBox &bound) |
void | RemoveItem (const LeafType &item, bool removeDuplicates=true) |
std::size_t | GetSize () const |
std::size_t | GetDimensions () const |
Protected Member Functions | |
Node * | ChooseSubtree (Node *node, const BoundingBox *bound) |
Node * | InsertInternal (Leaf *leaf, Node *node, bool firstInsert=true) |
Node * | OverflowTreatment (Node *level, bool firstInsert) |
Node * | Split (Node *node) |
void | Reinsert (Node *node) |
Private Attributes | |
Node * | m_root |
std::size_t | m_size |
Implementation of an RTree with an R* index.
LeafType | type of leaves stored in the tree |
dimensions | number of dimensions the bounding boxes are described in |
min_child_items | m, in the range 2 <= m < M |
max_child_items | M, in the range 2 <= m < M |
RemoveLeaf | A functor used to remove leaves from the tree |
Definition at line 87 of file RStarTree.h.
typedef RStarAcceptAny<Node, Leaf> RStarTree< LeafType, dimensions, min_child_items, max_child_items >::AcceptAny |
Definition at line 100 of file RStarTree.h.
typedef RStarAcceptEnclosing<Node, Leaf> RStarTree< LeafType, dimensions, min_child_items, max_child_items >::AcceptEnclosing |
Definition at line 99 of file RStarTree.h.
typedef RStarAcceptOverlapping<Node, Leaf> RStarTree< LeafType, dimensions, min_child_items, max_child_items >::AcceptOverlapping |
Definition at line 98 of file RStarTree.h.
typedef RStarBoundedItem<dimensions> RStarTree< LeafType, dimensions, min_child_items, max_child_items >::BoundedItem |
Definition at line 91 of file RStarTree.h.
typedef BoundedItem::BoundingBox RStarTree< LeafType, dimensions, min_child_items, max_child_items >::BoundingBox |
Definition at line 92 of file RStarTree.h.
typedef RStarLeaf<BoundedItem, LeafType> RStarTree< LeafType, dimensions, min_child_items, max_child_items >::Leaf |
Definition at line 95 of file RStarTree.h.
typedef RStarNode<BoundedItem> RStarTree< LeafType, dimensions, min_child_items, max_child_items >::Node |
Definition at line 94 of file RStarTree.h.
typedef RStarRemoveLeaf<Leaf> RStarTree< LeafType, dimensions, min_child_items, max_child_items >::RemoveLeaf |
Definition at line 103 of file RStarTree.h.
typedef RStarRemoveSpecificLeaf<Leaf> RStarTree< LeafType, dimensions, min_child_items, max_child_items >::RemoveSpecificLeaf |
Definition at line 104 of file RStarTree.h.
|
inline |
Definition at line 110 of file RStarTree.h.
|
inline |
Definition at line 115 of file RStarTree.h.
|
inlineprotected |
Definition at line 292 of file RStarTree.h.
|
inline |
Definition at line 284 of file RStarTree.h.
|
inline |
Definition at line 283 of file RStarTree.h.
|
inline |
Definition at line 123 of file RStarTree.h.
|
inlineprotected |
Definition at line 343 of file RStarTree.h.
|
inlineprotected |
Definition at line 393 of file RStarTree.h.
|
inline |
Touches each node using the visitor pattern.
You must specify an acceptor functor that takes a BoundingBox and a visitor that takes a BoundingBox and a const LeafType&.
See RStarVisitor.h for more information about the various visitor types available.
acceptor | An acceptor functor that returns true if this branch or leaf of the tree should be considered for visitation. |
visitor | A visitor functor that does the visiting |
Definition at line 215 of file RStarTree.h.
|
inlineprotected |
Definition at line 563 of file RStarTree.h.
|
inline |
Removes item(s) from the tree.
See RStarVisitor.h for more information about the various visitor types available.
acceptor | A node acceptor functor that returns true if this branch or leaf of the tree should be considered for deletion (it does not delete it, however. That is what the LeafRemover does). |
leafRemover | A visitor functor that decides whether that individual item should be removed from the tree. If it returns true, then the node holding that item will be deleted. |
See also RemoveBoundedArea, RemoveItem for examples of how this function can be called.
Definition at line 245 of file RStarTree.h.
|
inline |
Definition at line 270 of file RStarTree.h.
|
inline |
Definition at line 277 of file RStarTree.h.
|
inlineprotected |
Definition at line 436 of file RStarTree.h.
|
private |
Definition at line 759 of file RStarTree.h.
|
private |
Definition at line 761 of file RStarTree.h.