All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Public Attributes | List of all members
NetworKit::OctreeNode< T > Struct Template Reference

Node in the octree data structure. More...

#include <Octree.h>

Public Member Functions

 OctreeNode ()
 
 children ({})
 
 bBox (BoundingBox< T >())
 
 OctreeNode (BoundingBox< T > &bBox)
 
 bBox (bBox)
 
bool isLeaf () const
 
bool isEmpty () const
 
bool contains (const Point< T > &point) const
 
void computeCenterOfMass ()
 Computes octree node's (possibly weighted) center of mass. More...
 
void compress ()
 
std::string toString ()
 
void split (count dimensions, count numChildren)
 Split area corresponding octree node so as to obtain numChildren octree node children. More...
 
void addPoint (const Point< T > &point, count dimensions, count numChildrenPerNode)
 Adds point to octree node. More...
 

Public Attributes

count weight
 
Point< T > centerOfMass
 
std::vector< OctreeNodechildren
 
BoundingBox< T > bBox
 

Detailed Description

template<typename T>
struct NetworKit::OctreeNode< T >

Node in the octree data structure.

Constructor & Destructor Documentation

template<typename T>
NetworKit::OctreeNode< T >::OctreeNode ( )
inline
template<typename T>
NetworKit::OctreeNode< T >::OctreeNode ( BoundingBox< T > &  bBox)
inline

Member Function Documentation

template<typename T>
void NetworKit::OctreeNode< T >::addPoint ( const Point< T > &  point,
count  dimensions,
count  numChildrenPerNode 
)
inline

Adds point to octree node.

Parameters
[in]pointPoint to be added.
[in]dimensionsPoint's number of dimensions.
[in]numChildrenPerNodeNumber of children an octree node has if split.
template<typename T>
NetworKit::OctreeNode< T >::bBox ( BoundingBox< T >  ())
inline
template<typename T>
NetworKit::OctreeNode< T >::bBox ( bBox  )
inline
template<typename T>
NetworKit::OctreeNode< T >::children ( {}  )
template<typename T>
void NetworKit::OctreeNode< T >::compress ( )
inline
template<typename T>
void NetworKit::OctreeNode< T >::computeCenterOfMass ( )
inline

Computes octree node's (possibly weighted) center of mass.

template<typename T>
bool NetworKit::OctreeNode< T >::contains ( const Point< T > &  point) const
inline
Returns
True if point point is stored in the octree node, false otherwise.
template<typename T>
bool NetworKit::OctreeNode< T >::isEmpty ( ) const
inline
Returns
True if tree node has weight zero (== is empty), false otherwise.
template<typename T>
bool NetworKit::OctreeNode< T >::isLeaf ( ) const
inline
Returns
True if node is leaf, false otherwise.
template<typename T>
void NetworKit::OctreeNode< T >::split ( count  dimensions,
count  numChildren 
)
inline

Split area corresponding octree node so as to obtain numChildren octree node children.

template<typename T>
std::string NetworKit::OctreeNode< T >::toString ( )
inline
Returns
String label of octree node. Composed of sidelength, weight, and children's labels.

Member Data Documentation

template<typename T>
BoundingBox<T> NetworKit::OctreeNode< T >::bBox
template<typename T>
Point<T> NetworKit::OctreeNode< T >::centerOfMass
template<typename T>
std::vector<OctreeNode> NetworKit::OctreeNode< T >::children
template<typename T>
count NetworKit::OctreeNode< T >::weight

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