#include <RTGS.h>
Inherited by RHTGS_tree< base_tree >.
Inheritance diagram for RTGS_tree< base_tree >:
Public Member Functions | |
RTGS_tree (double skip) | |
RTGS_tree (R_tree_props *props, double skip) | |
RTGS_tree () | |
RTGS_tree (R_tree_props *props) | |
virtual | ~RTGS_tree () |
virtual void | ensureReady () |
void | bulkLoad () |
virtual base_tree * | insert (BB_container *element) |
virtual base_tree * | remove (BB_container *element) |
virtual base_tree * | search (BB_container *element) |
virtual vector< int > | containedIn (BB_type box) const |
virtual vector< int > | intersects (const vector< double > begin, const vector< double > end) const |
virtual vector< int > | intersects (Point point) const |
virtual vector< int > | intersects (vector< double > a, double b) const |
virtual vector< int > | neighboursOf (BB_container *item) const |
Protected Member Functions | |
virtual vector< Ordering< BB_container > * > | useOrderings () const |
virtual double | cost_function (const BB_type *x, const BB_type *y) const |
base_tree * | BulkLoadChunk (vector< BB_container * > *D, unsigned int h) |
vector< vector< BB_container * > * > * | BestBinarySplit (vector< BB_container * > *D, unsigned int m) |
vector< vector< BB_container * > * > * | Partition (vector< BB_container * > *D, unsigned int m) |
Protected Attributes | |
bool | loaded |
unsigned int | SKIP_PROBABILITY |
vector< BB_container > | cache |
Private Member Functions | |
virtual bool | checkReady () const |
base_tree | The type of non-bulkloaded R-tree which this class will bulk-load. |
Definition at line 46 of file RTGS.h.
Inherited constructor.
Definition at line 109 of file RTGS.h.
References RTGS_tree< base_tree >::loaded, and RTGS_tree< base_tree >::SKIP_PROBABILITY.
RTGS_tree< base_tree >::RTGS_tree | ( | R_tree_props * | props, | |
double | skip | |||
) | [inline] |
Inherited constructor.
Definition at line 112 of file RTGS.h.
References RTGS_tree< base_tree >::loaded, and RTGS_tree< base_tree >::SKIP_PROBABILITY.
Inherited constructor.
Definition at line 115 of file RTGS.h.
References _DEF_SR, RTGS_tree< base_tree >::loaded, and RTGS_tree< base_tree >::SKIP_PROBABILITY.
RTGS_tree< base_tree >::RTGS_tree | ( | R_tree_props * | props | ) | [inline] |
Inherited constructor.
Definition at line 118 of file RTGS.h.
References _DEF_SR, RTGS_tree< base_tree >::loaded, and RTGS_tree< base_tree >::SKIP_PROBABILITY.
virtual bool RTGS_tree< base_tree >::checkReady | ( | ) | const [inline, private, virtual] |
Checks if the tree is ready for access.
Definition at line 55 of file RTGS.h.
References RTGS_tree< base_tree >::loaded.
Referenced by RTGS_tree< base_tree >::containedIn(), RTGS_tree< base_tree >::intersects(), and RTGS_tree< base_tree >::neighboursOf().
vector< Ordering< BB_container > * > RTGS_tree< base_tree >::useOrderings | ( | ) | const [inline, protected, virtual] |
Method returning which orderings should be used. By default uses the low-coordinate x,y,z orderings.
Reimplemented in RHTGS_tree< base_tree >.
Definition at line 201 of file RTGS.h.
References Cubic_Bounding_Box_Container::getDefaultOrdering(), and Cubic_Bounding_Box_Container::getOrderings().
Referenced by RTGS_tree< base_tree >::BestBinarySplit(), and RTGS_tree< base_tree >::bulkLoad().
double RTGS_tree< base_tree >::cost_function | ( | const BB_type * | x, | |
const BB_type * | y | |||
) | const [inline, protected, virtual] |
The cost function used to determine the best binary split.
x | The first bounding box. | |
y | The second bounding box. |
Definition at line 189 of file RTGS.h.
References Cart::Volume().
Referenced by RTGS_tree< base_tree >::BestBinarySplit().
base_tree * RTGS_tree< base_tree >::BulkLoadChunk | ( | vector< BB_container * > * | D, | |
unsigned int | h | |||
) | [inline, protected] |
TGS Bulkloading subroutine. See report.
Definition at line 213 of file RTGS.h.
References RTGS_tree< base_tree >::Partition(), and Cubic_Bounding_Box::unite().
Referenced by RTGS_tree< base_tree >::bulkLoad().
vector< vector< BB_container * > * > * RTGS_tree< base_tree >::BestBinarySplit | ( | vector< BB_container * > * | D, | |
unsigned int | m | |||
) | [inline, protected] |
TGS Bulkloading subroutine. See report.
Definition at line 338 of file RTGS.h.
References _TIMINGS, RTGS_tree< base_tree >::cost_function(), Rintertimer, Rintertimersum, RTIMING, Cubic_Bounding_Box::unite(), and RTGS_tree< base_tree >::useOrderings().
Referenced by RTGS_tree< base_tree >::Partition().
vector< vector< BB_container * > * > * RTGS_tree< base_tree >::Partition | ( | vector< BB_container * > * | D, | |
unsigned int | m | |||
) | [inline, protected] |
TGS Bulkloading subroutine. See report.
Definition at line 292 of file RTGS.h.
References RTGS_tree< base_tree >::BestBinarySplit().
Referenced by RTGS_tree< base_tree >::BulkLoadChunk().
void RTGS_tree< base_tree >::ensureReady | ( | ) | [inline, virtual] |
Checks if the TGS tree is ready for queries. If not, it starts the bulk-loading mechanism automatically (and prints a warning to stderr).
Definition at line 194 of file RTGS.h.
References RTGS_tree< base_tree >::bulkLoad(), and RTGS_tree< base_tree >::loaded.
void RTGS_tree< base_tree >::bulkLoad | ( | ) | [inline] |
Starts bulk-loading the inserted elements
Definition at line 449 of file RTGS.h.
References RTGS_tree< base_tree >::BulkLoadChunk(), RTGS_tree< base_tree >::cache, RTGS_tree< base_tree >::loaded, Rintertimersum, RTIMER, RTIMING, TIMER, and RTGS_tree< base_tree >::useOrderings().
Referenced by RTGS_tree< base_tree >::ensureReady().
base_tree * RTGS_tree< base_tree >::insert | ( | BB_container * | element | ) | [inline, virtual] |
Chaches a given container element for bulk-loading into the R-tree structure.
element | The to be bulk-loaded element |
Definition at line 540 of file RTGS.h.
References RTGS_tree< base_tree >::cache, and RTGS_tree< base_tree >::loaded.
base_tree * RTGS_tree< base_tree >::remove | ( | BB_container * | element | ) | [inline, virtual] |
Removes a stored polytope from the R-tree structure. A pointer to the polytope must be explicitly given. If the polytope cannot be found within the R-tree, a warning is printed to stderr but no further action is taken.
element | The element to be removed from the R-tree. |
Definition at line 551 of file RTGS.h.
References RTGS_tree< base_tree >::cache, Cubic_Bounding_Box_Container::getID(), and RTGS_tree< base_tree >::loaded.
base_tree * RTGS_tree< base_tree >::search | ( | BB_container * | element | ) | [inline, virtual] |
Searches the R-tree for a given polytope, and returns the leaf node at which it is stored.
element | The element to be found |
Definition at line 564 of file RTGS.h.
References RTGS_tree< base_tree >::cache, Cubic_Bounding_Box_Container::getID(), and RTGS_tree< base_tree >::loaded.
vector< int > RTGS_tree< base_tree >::containedIn | ( | BB_type | box | ) | const [inline, virtual] |
See superclass Spatial_Tree
Definition at line 577 of file RTGS.h.
References RTGS_tree< base_tree >::checkReady().
vector< int > RTGS_tree< base_tree >::intersects | ( | const vector< double > | begin, | |
const vector< double > | end | |||
) | const [inline, virtual] |
See superclass Spatial_Tree
Definition at line 586 of file RTGS.h.
References RTGS_tree< base_tree >::checkReady().
vector< int > RTGS_tree< base_tree >::intersects | ( | Point | point | ) | const [inline, virtual] |
See superclass Spatial_Tree
Definition at line 595 of file RTGS.h.
References RTGS_tree< base_tree >::checkReady().
vector< int > RTGS_tree< base_tree >::intersects | ( | vector< double > | a, | |
double | b | |||
) | const [inline, virtual] |
See superclass Spatial_Tree
Definition at line 604 of file RTGS.h.
References RTGS_tree< base_tree >::checkReady().
vector< int > RTGS_tree< base_tree >::neighboursOf | ( | BB_container * | item | ) | const [inline, virtual] |
See superclass Spatial_Tree
Definition at line 613 of file RTGS.h.
References RTGS_tree< base_tree >::checkReady().
Whether or not the tree is bulk-loaded and ready for access
Definition at line 69 of file RTGS.h.
Referenced by RTGS_tree< base_tree >::bulkLoad(), RTGS_tree< base_tree >::checkReady(), RTGS_tree< base_tree >::ensureReady(), RTGS_tree< base_tree >::insert(), RTGS_tree< base_tree >::remove(), RTGS_tree< base_tree >::RTGS_tree(), and RTGS_tree< base_tree >::search().
unsigned int RTGS_tree< base_tree >::SKIP_PROBABILITY [protected] |
The probability for skipping a combination in the BestBinarySplit algorithm
Definition at line 72 of file RTGS.h.
Referenced by RTGS_tree< base_tree >::RTGS_tree().
vector< BB_container > RTGS_tree< base_tree >::cache [protected] |
Vector preallocating the leaf nodes. They are copied entirely into the cache in an attempt to gain speed by using a single large allocated chunk of memory for storing the leaf nodes.
Definition at line 77 of file RTGS.h.
Referenced by RTGS_tree< base_tree >::bulkLoad(), RTGS_tree< base_tree >::insert(), RTGS_tree< base_tree >::remove(), and RTGS_tree< base_tree >::search().