version 3.3

VRS::StaticSpaceTree< CONTENT, DIM > Class Template Reference

#include <vrs/container/spacetree.h>

Inheritance diagram for VRS::StaticSpaceTree< CONTENT, DIM >:

VRS::SpaceTree< NODE, DIM > VRS::SharedObj VRS::Visitable

List of all members.

Public Types

typedef SpaceTree< StaticNode
< CONTENT >, DIM > 
BaseClass
typedef SpaceTree< StaticNode
< CONTENT >, DIM >
::NodePointer 
NodePointer
typedef SpaceTreePath< DIM > Path
typedef StaticNode< CONTENT > Node

Public Member Functions

 VRS_TYPEINFO (StaticSpaceTree, BaseClass)
 VRS_SERIALIZABLE (StaticSpaceTree)
 StaticSpaceTree (const Cell< DIM > &mainCell, UINT depth)
virtual ~StaticSpaceTree ()
UINT getSize () const
UINT getDepth () const
 child, parent and path access
virtual NodePointer getRoot ()
virtual NodePointer getParent (const NodePointer &node)
virtual NodePointer getChild (const NodePointer &node, ChildNumber childNumber)
virtual ChildNumber getChildNumber (const NodePointer &node) const
 Optimized overloads of the default implementations that utilize the static structure.
virtual SpaceTreePath< DIM > getPath (const NodePointer &node) const
virtual NodePointer getNode (const SpaceTreePath< DIM > &path)

Protected Member Functions

 StaticSpaceTree (UINT depth)


Detailed Description

template<typename CONTENT, UINT DIM>
class VRS::StaticSpaceTree< CONTENT, DIM >

A StaticSpaceTree is a secialisation of a SpaceTree that implements a complete tree of (at construction) predefined depth. The implementation is array-based and utilized the static structure to gain performance and space efficiency advances compared to the DynamicSpaceTree. As in the dynamic variant the content is specified by a template parameter and can be accesed through a NodePointer by the expression "np->content".

Member Typedef Documentation

template<typename CONTENT, UINT DIM>
typedef SpaceTree<StaticNode<CONTENT>, DIM> VRS::StaticSpaceTree< CONTENT, DIM >::BaseClass

template<typename CONTENT, UINT DIM>
typedef SpaceTree<StaticNode<CONTENT>, DIM>::NodePointer VRS::StaticSpaceTree< CONTENT, DIM >::NodePointer

template<typename CONTENT, UINT DIM>
typedef SpaceTreePath<DIM> VRS::StaticSpaceTree< CONTENT, DIM >::Path

The original declaration of the following methods are part of a quite unreadable code section that need not to be read to understand how to use a SpaceTree. Therefore their declarations are repeated here: template<typename POINTSET,typename INCLUSIONTEST> SpaceTreePath<DIM> findSmallestEnclosingNode( const POINTSET& pointSet, UINT maxLevel = Path::MaxPathLength(), bool mustExist = true, INCLUSIONTEST test = DefaultInclusionTest<POINTSET>()); Returns the longest path that leads to a node whose cell completely encloses a given point set. If the path length attains "maxLevel", the search is aborted and the path of length maxLevel is returned. Not that the length of a path cannot exceed Path::MaxPathLength(). If "mustExist" is true, only existing nodes are considered. Otherwise the result can be a path leading to a still not existing node, whose cell would enclose the point set. The parameter "test" is a function object that provides an operator() with two parameters pointSet and cell, that returns true if the pointSet is contained in the cell. You can see how to realize the function object on the example of the DefaultIntersectionTest class (see below). If POINTSET provides a method isContainedIn(Cell), the test parameter can be left out. template<typename POINTSET, typename INTERSECTIONTEST> Iterator<SpaceTreePath<DIM> >* findIntersectingNodes( const POINTSET& pointSet, UINT level, bool mustExist = true, INTERSECTIONTEST test = DefaultIntersectionTest<POINTSET>()); Returns an iterator of paths to all nodes on a specified tree level that intersect a given point set. For the "mustExist" parameter see above. The intersection test of a point set and a cell is performed similar to the inclusion test above. The parameter "test" can be left out if POINTSET provides a method intersects(Cell). template<typename POINTSET, typename INCLUSIONTEST> Iterator<SpaceTreePath<DIM> >* findEnclosingNodes( const POINTSET& pointSet, UINT level, bool mustExist, INCLUSIONTEST test) { This method is only useful for derivates of SpaceTree that enable overlapping cells. Otherwise the result is empty or contains exactly one element,

Reimplemented from VRS::SpaceTree< NODE, DIM >.

Reimplemented in VRS::StaticOctree< CONTENT >, and VRS::StaticQuadtree< CONTENT >.

template<typename CONTENT, UINT DIM>
typedef StaticNode<CONTENT> VRS::StaticSpaceTree< CONTENT, DIM >::Node


Constructor & Destructor Documentation

template<typename CONTENT, UINT DIM>
VRS::StaticSpaceTree< CONTENT, DIM >::StaticSpaceTree ( const Cell< DIM > &  mainCell,
UINT  depth 
)

template<typename CONTENT, UINT DIM>
virtual VRS::StaticSpaceTree< CONTENT, DIM >::~StaticSpaceTree (  )  [virtual]

template<typename CONTENT, UINT DIM>
VRS::StaticSpaceTree< CONTENT, DIM >::StaticSpaceTree ( UINT  depth  )  [protected]


Member Function Documentation

template<typename CONTENT, UINT DIM>
VRS::StaticSpaceTree< CONTENT, DIM >::VRS_TYPEINFO ( StaticSpaceTree< CONTENT, DIM >  ,
BaseClass   
)

template<typename CONTENT, UINT DIM>
VRS::StaticSpaceTree< CONTENT, DIM >::VRS_SERIALIZABLE ( StaticSpaceTree< CONTENT, DIM >   ) 

template<typename CONTENT, UINT DIM>
UINT VRS::StaticSpaceTree< CONTENT, DIM >::getSize (  )  const

template<typename CONTENT, UINT DIM>
UINT VRS::StaticSpaceTree< CONTENT, DIM >::getDepth (  )  const

child, parent and path access

template<typename CONTENT, UINT DIM>
virtual NodePointer VRS::StaticSpaceTree< CONTENT, DIM >::getRoot (  )  [virtual]

Each node access is done by an via NodePointers. A NodePointer provides access to a specific node of a specific tree similar to a usual pointer by * and -> operator. Using invalid NodePointers causes an assertion. Invalid pointers are return for example if a requested node does not exist. The NodePointer provides a validity check method valid(). Note: If a node of a tree is deleted, all existing NodePointers pointing to any nodes of the tree become invalid. Basic SpaceTree access methods. If you want to derive a class from SpaceTree, please note: It is assumed that the first three of the methods below return an invalid NodePointer if the requested Node does not exist.

Implements VRS::SpaceTree< NODE, DIM >.

template<typename CONTENT, UINT DIM>
virtual NodePointer VRS::StaticSpaceTree< CONTENT, DIM >::getParent ( const NodePointer node  )  [virtual]

template<typename CONTENT, UINT DIM>
virtual NodePointer VRS::StaticSpaceTree< CONTENT, DIM >::getChild ( const NodePointer node,
ChildNumber  childNumber 
) [virtual]

template<typename CONTENT, UINT DIM>
virtual ChildNumber VRS::StaticSpaceTree< CONTENT, DIM >::getChildNumber ( const NodePointer node  )  const [virtual]

Optimized overloads of the default implementations that utilize the static structure.

Implements VRS::SpaceTree< NODE, DIM >.

template<typename CONTENT, UINT DIM>
virtual SpaceTreePath<DIM> VRS::StaticSpaceTree< CONTENT, DIM >::getPath ( const NodePointer node  )  const [virtual]

Reimplemented from VRS::SpaceTree< NODE, DIM >.

template<typename CONTENT, UINT DIM>
virtual NodePointer VRS::StaticSpaceTree< CONTENT, DIM >::getNode ( const SpaceTreePath< DIM > &  path  )  [virtual]

Reimplemented from VRS::SpaceTree< NODE, DIM >.


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

Generated on Wed May 23 06:00:17 2012 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact