FPB_tree< base_tree > Class Template Reference

#include <FPB.h>

List of all members.

Public Member Functions

 FPB_tree ()
 FPB_tree (R_tree_props *props)
virtual ~FPB_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 Ordering< BB_container > * useOrdering () const

Private Member Functions

virtual bool checkReady () const
vector< base_tree * > bulkLoad (vector< BB_container * > *input)

Private Attributes

bool loaded
vector< BB_containercache


Detailed Description

template<typename base_tree>
class FPB_tree< base_tree >

Fast Packed Bulk-loaded Hilbert R-tree

Definition at line 20 of file FPB.h.


Constructor & Destructor Documentation

template<typename base_tree>
FPB_tree< base_tree >::FPB_tree (  )  [inline]

Base constructor. Tells the R-tree it is bulk-loading *not* to delete its leaf nodes since the FPB algorithm will cache them.

Definition at line 63 of file FPB.h.

References FPB_tree< base_tree >::loaded.

template<typename base_tree>
FPB_tree< base_tree >::FPB_tree ( R_tree_props props  )  [inline]

Base constructor. Takes as an argument given R-tree properties.

Parameters:
props Pointer to a given set of properties.
See also:
FPB_tree()

Definition at line 71 of file FPB.h.

References FPB_tree< base_tree >::loaded.

template<typename base_tree>
virtual FPB_tree< base_tree >::~FPB_tree (  )  [inline, virtual]

Base deconstructor.

Definition at line 76 of file FPB.h.


Member Function Documentation

template<typename base_tree>
virtual bool FPB_tree< base_tree >::checkReady (  )  const [inline, private, virtual]

Checks if the tree is ready for access.

Returns:
Whether or not the tree is ready for access.

Definition at line 29 of file FPB.h.

References FPB_tree< base_tree >::loaded.

Referenced by FPB_tree< base_tree >::containedIn(), FPB_tree< base_tree >::intersects(), and FPB_tree< base_tree >::neighboursOf().

template<typename base_tree>
vector< base_tree * > FPB_tree< base_tree >::bulkLoad ( vector< BB_container * > *  input  )  [inline, private]

Starts bulk-loading the elements in a given vector

Parameters:
input The elements to be inserted
Returns:
The children of final R-tree root

Definition at line 216 of file FPB.h.

References Cubic_Bounding_Box::clear().

template<typename base_tree>
Ordering< BB_container > * FPB_tree< base_tree >::useOrdering (  )  const [inline, protected, virtual]

The default ordering this tree will use for sorting.

Returns:
Pointer to the default ordering.

Definition at line 148 of file FPB.h.

References Cubic_Bounding_Box_Container::HILC_ORDERING.

Referenced by FPB_tree< base_tree >::bulkLoad().

template<typename base_tree>
void FPB_tree< base_tree >::ensureReady (  )  [inline, virtual]

Checks if the FPB tree is ready for queries. If not, it starts the bulk-loading mechanism automatically (and prints a warning to stderr).

Definition at line 141 of file FPB.h.

References FPB_tree< base_tree >::bulkLoad(), and FPB_tree< base_tree >::loaded.

template<typename base_tree>
void FPB_tree< base_tree >::bulkLoad (  )  [inline]

Starts bulk-loading the inserted elements

Definition at line 154 of file FPB.h.

References FPB_tree< base_tree >::cache, FPB_tree< base_tree >::loaded, and FPB_tree< base_tree >::useOrdering().

Referenced by FPB_tree< base_tree >::ensureReady().

template<typename base_tree>
base_tree * FPB_tree< base_tree >::insert ( BB_container element  )  [inline, virtual]

Chaches a given container element for bulk-loading into the R-tree structure.

Parameters:
element The to be bulk-loaded element
Returns:
The root of the element

Definition at line 278 of file FPB.h.

References FPB_tree< base_tree >::cache, and FPB_tree< base_tree >::loaded.

template<typename base_tree>
base_tree * FPB_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.

Parameters:
element The element to be removed from the R-tree.
Returns:
The (new) root of the R-tree.

Definition at line 289 of file FPB.h.

References FPB_tree< base_tree >::cache, Cubic_Bounding_Box_Container::getID(), and FPB_tree< base_tree >::loaded.

template<typename base_tree>
base_tree * FPB_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.

Parameters:
element The element to be found
Returns:
The leaf node at which the given polytope is found

Definition at line 302 of file FPB.h.

References FPB_tree< base_tree >::cache, Cubic_Bounding_Box_Container::getID(), and FPB_tree< base_tree >::loaded.

template<typename base_tree>
vector< int > FPB_tree< base_tree >::containedIn ( BB_type  box  )  const [inline, virtual]

See superclass Spatial_Tree

Definition at line 315 of file FPB.h.

References FPB_tree< base_tree >::checkReady().

template<typename base_tree>
vector< int > FPB_tree< base_tree >::intersects ( const vector< double >  begin,
const vector< double >  end 
) const [inline, virtual]

See superclass Spatial_Tree

Definition at line 324 of file FPB.h.

References FPB_tree< base_tree >::checkReady().

template<typename base_tree>
vector< int > FPB_tree< base_tree >::intersects ( Point  point  )  const [inline, virtual]

See superclass Spatial_Tree

Definition at line 333 of file FPB.h.

References FPB_tree< base_tree >::checkReady().

template<typename base_tree>
vector< int > FPB_tree< base_tree >::intersects ( vector< double >  a,
double  b 
) const [inline, virtual]

See superclass Spatial_Tree

Definition at line 342 of file FPB.h.

References FPB_tree< base_tree >::checkReady().

template<typename base_tree>
vector< int > FPB_tree< base_tree >::neighboursOf ( BB_container item  )  const [inline, virtual]

See superclass Spatial_Tree

Definition at line 351 of file FPB.h.

References FPB_tree< base_tree >::checkReady().


Member Data Documentation

template<typename base_tree>
bool FPB_tree< base_tree >::loaded [private]

Whether or not the tree is bulk-loaded and ready for access

Definition at line 32 of file FPB.h.

Referenced by FPB_tree< base_tree >::bulkLoad(), FPB_tree< base_tree >::checkReady(), FPB_tree< base_tree >::ensureReady(), FPB_tree< base_tree >::FPB_tree(), FPB_tree< base_tree >::insert(), FPB_tree< base_tree >::remove(), and FPB_tree< base_tree >::search().

template<typename base_tree>
vector< BB_container > FPB_tree< base_tree >::cache [private]

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 37 of file FPB.h.

Referenced by FPB_tree< base_tree >::bulkLoad(), FPB_tree< base_tree >::insert(), FPB_tree< base_tree >::remove(), and FPB_tree< base_tree >::search().


The documentation for this class was generated from the following file:
Generated on Sat Oct 13 17:34:43 2007 for R-Tree by  doxygen 1.5.2