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