Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES > Class Template Reference

#include <RTree.h>

Collaboration diagram for RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >:
[legend]

Data Structures

struct  Branch
 
class  Iterator
 Iterator is not remove safe. More...
 
struct  ListNode
 A link list of nodes for reinsertion after a delete operation. More...
 
struct  Node
 Node for each branch level. More...
 
struct  PartitionVars
 Variables for finding a split partition. More...
 
struct  Rect
 Minimal bounding rectangle (n-dimensional) More...
 

Public Types

enum  { MAXNODES = TMAXNODES , MINNODES = TMINNODES }
 
typedef void(DATATYPENP::* Operation) (const CONTEXT &) const
 

Public Member Functions

int Count ()
 Count the data elements in this container. This is slow as no internal counter is maintained.
 
DATATYPE & GetAt (Iterator &a_it)
 Get object at iterator position.
 
void GetFirst (Iterator &a_it)
 Get 'first' for iteration.
 
void GetNext (Iterator &a_it)
 Get Next for iteration.
 
virtual void Insert (const ELEMTYPE a_min[NUMDIMS], const ELEMTYPE a_max[NUMDIMS], const DATATYPE &a_dataId)
 
bool IsNull (Iterator &a_it)
 Is iterator NULL, or at end?
 
virtual void Remove (const ELEMTYPE a_min[NUMDIMS], const ELEMTYPE a_max[NUMDIMS], const DATATYPE &a_dataId)
 
void RemoveAll ()
 DK 15.10.2008 - end.
 
 RTree (Operation operation)
 
virtual int Search (const ELEMTYPE a_min[NUMDIMS], const ELEMTYPE a_max[NUMDIMS], const CONTEXT &c) const
 DK 15.10.2008 - begin.
 
virtual ~RTree ()
 

Protected Member Functions

bool AddBranch (Branch *a_branch, Node *a_node, Node **a_newNode)
 
ListNodeAllocListNode ()
 
NodeAllocNode ()
 
ELEMTYPEREAL CalcRectVolume (Rect *a_rect)
 
void ChoosePartition (PartitionVars *a_parVars, int a_minFill)
 
void Classify (int a_index, int a_group, PartitionVars *a_parVars)
 
Rect CombineRect (Rect *a_rectA, Rect *a_rectB)
 
void CountRec (Node *a_node, int &a_count)
 
void DisconnectBranch (Node *a_node, int a_index)
 
void FreeListNode (ListNode *a_listNode)
 
void FreeNode (Node *a_node)
 
void GetBranches (Node *a_node, Branch *a_branch, PartitionVars *a_parVars)
 
void InitNode (Node *a_node)
 
void InitParVars (PartitionVars *a_parVars, int a_maxRects, int a_minFill)
 
void InitRect (Rect *a_rect)
 
bool InsertRect (Rect *a_rect, const DATATYPE &a_id, Node **a_root, int a_level)
 
bool InsertRectRec (Rect *a_rect, const DATATYPE &a_id, Node *a_node, Node **a_newNode, int a_level)
 
void LoadNodes (Node *a_nodeA, Node *a_nodeB, PartitionVars *a_parVars)
 
Rect NodeCover (Node *a_node)
 
bool Overlap (Rect *a_rectA, Rect *a_rectB) const
 
int PickBranch (Rect *a_rect, Node *a_node)
 
void PickSeeds (PartitionVars *a_parVars)
 
ELEMTYPEREAL RectSphericalVolume (Rect *a_rect)
 
ELEMTYPEREAL RectVolume (Rect *a_rect)
 
void ReInsert (Node *a_node, ListNode **a_listNode)
 
void RemoveAllRec (Node *a_node)
 
bool RemoveRect (Rect *a_rect, const DATATYPE &a_id, Node **a_root)
 
bool RemoveRectRec (Rect *a_rect, const DATATYPE &a_id, Node *a_node, ListNode **a_listNode)
 
void Reset ()
 
bool Search (Node *a_node, Rect *a_rect, int &a_foundCount, const CONTEXT &c) const
 
void SplitNode (Node *a_node, Branch *a_branch, Node **a_newNode)
 

Protected Attributes

Nodem_root
 Root of tree.
 
ELEMTYPEREAL m_unitSphereVolume
 Unit sphere constant for required number of dimensions.
 
Operation myOperation
 

Detailed Description

template<class DATATYPE, class DATATYPENP, class ELEMTYPE, int NUMDIMS, class CONTEXT, class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
class RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >

Implementation of RTree, a multidimensional bounding rectangle tree. Example usage: For a 3-dimensional tree use RTree<Object*, float, 3> myTree;

This modified, templated C++ version by Greg Douglas at Auran (http://www.auran.com)

DATATYPE Referenced data, should be int, void*, obj* etc. no larger than sizeof<void*> and simple type ELEMTYPE Type of element such as int or float NUMDIMS Number of dimensions such as 2 or 3 ELEMTYPEREAL Type of element that allows fractional and large values such as float or double, for use in volume calcs

NOTES: Inserting and removing data requires the knowledge of its constant Minimal Bounding Rectangle. This version uses new/delete for nodes, I recommend using a fixed size allocator for efficiency. Instead of using a callback function for returned results, I recommend and efficient pre-sized, grow-only memory array similar to MFC CArray or STL Vector for returning search query result.

Definition at line 61 of file RTree.h.

Member Typedef Documentation

◆ Operation

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
typedef void(DATATYPENP::* RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Operation) (const CONTEXT &) const

Definition at line 79 of file RTree.h.

Member Enumeration Documentation

◆ anonymous enum

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
anonymous enum
Enumerator
MAXNODES 

Max elements in node.

MINNODES 

Min elements in node.

Definition at line 71 of file RTree.h.

Constructor & Destructor Documentation

◆ RTree()

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::RTree ( Operation  operation)

◆ ~RTree()

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
virtual RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::~RTree ( )
virtual

Member Function Documentation

◆ AddBranch()

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
bool RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::AddBranch ( Branch a_branch,
Node a_node,
Node **  a_newNode 
)
protected

◆ AllocListNode()

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
ListNode * RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::AllocListNode ( )
protected

◆ AllocNode()

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
Node * RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::AllocNode ( )
protected

◆ CalcRectVolume()

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
ELEMTYPEREAL RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::CalcRectVolume ( Rect a_rect)
protected

◆ ChoosePartition()

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
void RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::ChoosePartition ( PartitionVars a_parVars,
int  a_minFill 
)
protected

◆ Classify()

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
void RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Classify ( int  a_index,
int  a_group,
PartitionVars a_parVars 
)
protected

◆ CombineRect()

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
Rect RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::CombineRect ( Rect a_rectA,
Rect a_rectB 
)
protected

◆ Count()

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
int RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Count ( )

Count the data elements in this container. This is slow as no internal counter is maintained.

◆ CountRec()

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
void RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::CountRec ( Node a_node,
int &  a_count 
)
protected

◆ DisconnectBranch()

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
void RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::DisconnectBranch ( Node a_node,
int  a_index 
)
protected

◆ FreeListNode()

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
void RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::FreeListNode ( ListNode a_listNode)
protected

◆ FreeNode()

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
void RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::FreeNode ( Node a_node)
protected

◆ GetAt()

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
DATATYPE & RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::GetAt ( Iterator a_it)
inline

Get object at iterator position.

Definition at line 263 of file RTree.h.

◆ GetBranches()

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
void RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::GetBranches ( Node a_node,
Branch a_branch,
PartitionVars a_parVars 
)
protected

◆ GetFirst()

◆ GetNext()

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
void RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::GetNext ( Iterator a_it)
inline

Get Next for iteration.

Definition at line 257 of file RTree.h.

◆ InitNode()

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
void RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::InitNode ( Node a_node)
protected

◆ InitParVars()

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
void RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::InitParVars ( PartitionVars a_parVars,
int  a_maxRects,
int  a_minFill 
)
protected

◆ InitRect()

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
void RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::InitRect ( Rect a_rect)
protected

◆ Insert()

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
virtual void RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Insert ( const ELEMTYPE  a_min[NUMDIMS],
const ELEMTYPE  a_max[NUMDIMS],
const DATATYPE &  a_dataId 
)
virtual

Insert entry

Parameters
a_minMin of bounding rect
a_maxMax of bounding rect
a_dataIdPositive Id of data. Maybe zero, but negative numbers not allowed.

◆ InsertRect()

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
bool RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::InsertRect ( Rect a_rect,
const DATATYPE &  a_id,
Node **  a_root,
int  a_level 
)
protected

◆ InsertRectRec()

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
bool RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::InsertRectRec ( Rect a_rect,
const DATATYPE &  a_id,
Node a_node,
Node **  a_newNode,
int  a_level 
)
protected

◆ IsNull()

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
bool RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::IsNull ( Iterator a_it)
inline

◆ LoadNodes()

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
void RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::LoadNodes ( Node a_nodeA,
Node a_nodeB,
PartitionVars a_parVars 
)
protected

◆ NodeCover()

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
Rect RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::NodeCover ( Node a_node)
protected

◆ Overlap()

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
bool RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Overlap ( Rect a_rectA,
Rect a_rectB 
) const
protected

◆ PickBranch()

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
int RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::PickBranch ( Rect a_rect,
Node a_node 
)
protected

◆ PickSeeds()

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
void RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::PickSeeds ( PartitionVars a_parVars)
protected

◆ RectSphericalVolume()

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
ELEMTYPEREAL RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::RectSphericalVolume ( Rect a_rect)
protected

◆ RectVolume()

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
ELEMTYPEREAL RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::RectVolume ( Rect a_rect)
protected

◆ ReInsert()

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
void RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::ReInsert ( Node a_node,
ListNode **  a_listNode 
)
protected

◆ Remove()

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
virtual void RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Remove ( const ELEMTYPE  a_min[NUMDIMS],
const ELEMTYPE  a_max[NUMDIMS],
const DATATYPE &  a_dataId 
)
virtual

Remove entry

Parameters
a_minMin of bounding rect
a_maxMax of bounding rect
a_dataIdPositive Id of data. Maybe zero, but negative numbers not allowed.

◆ RemoveAll()

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
void RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::RemoveAll ( )

DK 15.10.2008 - end.

Remove all entries from tree

◆ RemoveAllRec()

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
void RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::RemoveAllRec ( Node a_node)
protected

◆ RemoveRect()

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
bool RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::RemoveRect ( Rect a_rect,
const DATATYPE &  a_id,
Node **  a_root 
)
protected

◆ RemoveRectRec()

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
bool RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::RemoveRectRec ( Rect a_rect,
const DATATYPE &  a_id,
Node a_node,
ListNode **  a_listNode 
)
protected

◆ Reset()

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
void RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Reset ( )
protected

◆ Search() [1/2]

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
virtual int RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Search ( const ELEMTYPE  a_min[NUMDIMS],
const ELEMTYPE  a_max[NUMDIMS],
const CONTEXT &  c 
) const
virtual

DK 15.10.2008 - begin.

Find all within search rectangle

Parameters
a_minMin of search bounding rect
a_maxMax of search bounding rect
a_searchResultSearch result array. Caller should set grow size. Function will reset, not append to array.
a_resultCallbackCallback function to return result. Callback should return 'true' to continue searching
a_contextUser context to pass as parameter to a_resultCallback
Returns
Returns the number of entries found

◆ Search() [2/2]

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
bool RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Search ( Node a_node,
Rect a_rect,
int &  a_foundCount,
const CONTEXT &  c 
) const
protected

◆ SplitNode()

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
void RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::SplitNode ( Node a_node,
Branch a_branch,
Node **  a_newNode 
)
protected

Field Documentation

◆ m_root

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
Node* RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::m_root
protected

◆ m_unitSphereVolume

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
ELEMTYPEREAL RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::m_unitSphereVolume
protected

Unit sphere constant for required number of dimensions.

Definition at line 360 of file RTree.h.

◆ myOperation

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
Operation RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::myOperation
protected

Definition at line 361 of file RTree.h.


The documentation for this class was generated from the following file: