SUMO - Simulation of Urban MObility
|
A RT-tree for efficient storing of SUMO's Named objects. More...
#include <NamedRTree.h>
Public Member Functions | |
void | Insert (const float a_min[2], const float a_max[2], Named *a_data) |
Insert entry. More... | |
NamedRTree () | |
Constructor. More... | |
void | Remove (const float a_min[2], const float a_max[2], Named *a_data) |
Remove entry. More... | |
void | RemoveAll () |
Remove all enrties. More... | |
int | Search (const float a_min[2], const float a_max[2], const Named::StoringVisitor &c) const |
Find all within search rectangle. More... | |
~NamedRTree () | |
Destructor. More... | |
Private Types | |
enum | |
typedef void(Named::* | Operation )(const Named::StoringVisitor &) const |
Private Member Functions | |
bool | AddBranch (Branch *a_branch, Node *a_node, Node **a_newNode) |
ListNode * | AllocListNode () |
Node * | AllocNode () |
float | 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) |
int | Count () |
Count the data elements in this container. This is slow as no internal counter is maintained. More... | |
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) |
Named *& | GetAt (Iterator &a_it) |
Get object at iterator position. More... | |
void | GetBranches (Node *a_node, Branch *a_branch, PartitionVars *a_parVars) |
void | GetFirst (Iterator &a_it) |
Get 'first' for iteration. More... | |
void | GetNext (Iterator &a_it) |
Get Next for iteration. More... | |
void | InitNode (Node *a_node) |
void | InitParVars (PartitionVars *a_parVars, int a_maxRects, int a_minFill) |
void | InitRect (Rect *a_rect) |
virtual void | Insert (const floata_min[NUMDIMS], const floata_max[NUMDIMS], const Named *&a_dataId) |
bool | InsertRect (Rect *a_rect, const Named *&a_id, Node **a_root, int a_level) |
bool | InsertRectRec (Rect *a_rect, const Named *&a_id, Node *a_node, Node **a_newNode, int a_level) |
bool | IsNull (Iterator &a_it) |
Is iterator NULL, or at end? More... | |
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) |
float | RectSphericalVolume (Rect *a_rect) |
float | RectVolume (Rect *a_rect) |
void | ReInsert (Node *a_node, ListNode **a_listNode) |
virtual void | Remove (const floata_min[NUMDIMS], const floata_max[NUMDIMS], const Named *&a_dataId) |
void | RemoveAllRec (Node *a_node) |
bool | RemoveRect (Rect *a_rect, const Named *&a_id, Node **a_root) |
bool | RemoveRectRec (Rect *a_rect, const Named *&a_id, Node *a_node, ListNode **a_listNode) |
void | Reset () |
virtual int | Search (const floata_min[NUMDIMS], const floata_max[NUMDIMS], const Named::StoringVisitor &c) const |
DK 15.10.2008 - begin. More... | |
bool | Search (Node *a_node, Rect *a_rect, int &a_foundCount, const Named::StoringVisitor &c) const |
void | SplitNode (Node *a_node, Branch *a_branch, Node **a_newNode) |
Private Attributes | |
Node * | m_root |
Root of tree. More... | |
float | m_unitSphereVolume |
Unit sphere constant for required number of dimensions. More... | |
Operation | myOperation |
A RT-tree for efficient storing of SUMO's Named objects.
This class specialises the used RT-tree implementation from "rttree.h". It stores names of "Named"-objects.
Definition at line 60 of file NamedRTree.h.
|
inherited |
|
inline |
Constructor.
Definition at line 63 of file NamedRTree.h.
|
inline |
Destructor.
Definition at line 69 of file NamedRTree.h.
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
inherited |
Count the data elements in this container. This is slow as no internal counter is maintained.
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
Insert entry.
a_min | Min of bounding rect |
a_max | Max of bounding rect |
a_data | The instance of a Named-object to add (the ID is added) |
Definition at line 79 of file NamedRTree.h.
References RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Insert().
Referenced by MSDevice_BTreceiver::BTreceiverUpdate::execute(), TraCIServerAPI_InductionLoop::getTree(), TraCIServerAPI_Junction::getTree(), TraCIServerAPI_POI::getTree(), and TraCIServerAPI_Polygon::getTree().
|
virtualinherited |
Insert entry
a_min | Min of bounding rect |
a_max | Max of bounding rect |
a_dataId | Positive Id of data. Maybe zero, but negative numbers not allowed. |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
Remove entry.
a_min | Min of bounding rect |
a_max | Max of bounding rect |
a_data | The instance of a Named-object to remove |
Definition at line 90 of file NamedRTree.h.
References RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Remove().
|
virtualinherited |
Remove entry
a_min | Min of bounding rect |
a_max | Max of bounding rect |
a_dataId | Positive Id of data. Maybe zero, but negative numbers not allowed. |
|
inline |
Remove all enrties.
Definition at line 98 of file NamedRTree.h.
References RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::RemoveAll().
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
virtualinherited |
DK 15.10.2008 - begin.
Find all within search rectangle
a_min | Min of search bounding rect |
a_max | Max of search bounding rect |
a_searchResult | Search result array. Caller should set grow size. Function will reset, not append to array. |
a_resultCallback | Callback function to return result. Callback should return 'true' to continue searching |
a_context | User context to pass as parameter to a_resultCallback |
|
inline |
Find all within search rectangle.
a_min | Min of search bounding rect |
a_max | Max of search bounding rect |
a_searchResult | Search result array. Caller should set grow size. Function will reset, not append to array. |
a_resultCallback | Callback function to return result. Callback should return 'true' to continue searching |
a_context | User context to pass as parameter to a_resultCallback |
Definition at line 112 of file NamedRTree.h.
References RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Search().
Referenced by MSDevice_BTreceiver::BTreceiverUpdate::execute().
|
protectedinherited |
|
protectedinherited |