Implentation of the reduced quadtree for Dim dimensions. More...
#include <ogdf/energybased/dtree/DTree.h>
Classes | |
| struct | MortonEntry |
| The entry in the sorted order for a point. More... | |
| struct | Node |
| The node class. More... | |
| struct | Point |
| The point class with integer coords. More... | |
Public Member Functions | |
| DTree (int numPoints) | |
| constructor | |
| ~DTree () | |
| destructor | |
| void | adjustPointInfo (int curr) |
| used to update the first and numPoints of inner nodes by linkNodes | |
| void | build () |
| Does all required steps except the allocate, deallocate, randomPoints. | |
| int | child (int i, int j) const |
| returns the index of the j th child of node i | |
| int | countPoints () const |
| Just for fun: traverse the tree and count the points in the leaves. | |
| int | countPoints (int curr) const |
| Just for fun: traverse the tree and count the points in the leaves. | |
| void | linkNodes () |
| The Recursive Bottom-Up Construction (recursion start) | |
| int | linkNodes (int curr, int maxLevel) |
| The Recursive Bottom-Up Construction. | |
| int | maxNumNodes () const |
| returns the maximum number of nodes (and the max index of a node) | |
| void | mergeWithNext (int curr) |
| Merges curr with next node in the chain (used by linkNodes) | |
| Node & | node (int i) |
| Just to access the nodes a little bit easier. | |
| const Node & | node (int i) const |
| Just to access the nodes a little bit easier. | |
| int | numChilds (int i) const |
| returns the number of children of node i | |
| int | numPoints () const |
| returns the number of points the quadtree contains | |
| int | numPoints (int i) const |
| returns the number of points covered by this subtree | |
| const Point & | point (int i) const |
| returns the ith point in the input sequence | |
| int | point (int i, int j) const |
| returns the index of the jth point covered by i's subtree. | |
| void | prepareMortonOrder () |
| Prepares the morton numbers for sorting. | |
| void | prepareNodeLayer () |
| Prepares both the leaf and inner node layer. | |
| int | rootIndex () const |
| returns the index of the root node | |
| void | setPoint (int i, int d, IntType value) |
| sets the point to the given grid coords | |
| void | sortMortonNumbers () |
| Sorts the points by morton number. | |
Static Public Attributes | |
| static constexpr int | MaxNumChildrenPerNode = (1 << Dim) |
| the maximum number of children per node = 2^d | |
Private Member Functions | |
| void | allocate (int n) |
| Allocates memory for n points. | |
| void | deallocate () |
| Releases memory. | |
Private Attributes | |
| int | m_maxLevel |
| MortonEntry * | m_mortonOrder = nullptr |
| The order to be sorted. | |
| Node * | m_nodes = nullptr |
| Memory for all nodes. | |
| int | m_numPoints |
| Total number of points. | |
| Point * | m_points = nullptr |
| The input set. | |
| int | m_rootIndex |
| The index of the root node. | |
Implentation of the reduced quadtree for Dim dimensions.
|
inlineexplicit |
|
inline |
|
inline |
|
private |
| void ogdf::energybased::dtree::DTree< IntType, Dim >::build | ( | ) |
|
inline |
|
inline |
| int ogdf::energybased::dtree::DTree< IntType, Dim >::countPoints | ( | int | curr | ) | const |
|
private |
| void ogdf::energybased::dtree::DTree< IntType, Dim >::linkNodes | ( | ) |
| int ogdf::energybased::dtree::DTree< IntType, Dim >::linkNodes | ( | int | curr, |
| int | maxLevel | ||
| ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| void ogdf::energybased::dtree::DTree< IntType, Dim >::prepareMortonOrder | ( | ) |
| void ogdf::energybased::dtree::DTree< IntType, Dim >::prepareNodeLayer | ( | ) |
|
inline |
| void ogdf::energybased::dtree::DTree< IntType, Dim >::setPoint | ( | int | i, |
| int | d, | ||
| IntType | value | ||
| ) |
| void ogdf::energybased::dtree::DTree< IntType, Dim >::sortMortonNumbers | ( | ) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
staticconstexpr |