#include <NaiveQuadtree.h>
Classes | |
class | BranchNode |
class | HorizontalBranchNode |
class | LeafNode |
class | Node |
class | RectangularBranchNode |
class | VerticalBranchNode |
Public Member Functions | |
NaiveQuadtree (T ar[], unsigned int width, unsigned int height, T threshold) | |
unsigned int | getWidth () const |
unsigned int | getHeight () const |
const T & | operator() (unsigned int x, unsigned int y) const |
unsigned int | getLevel (unsigned int x, unsigned int y) const |
unsigned int | getNodeCount () const |
An implementation of a region quadtree that represents a rectangle and provides access through 2D indexing. The tree is static, that is, no modification of the data is allowed.
This is a very simple implementation; it is not highly optimised.
T | A type of the Order2Statistical concept, for instance int or float. |
Definition at line 28 of file NaiveQuadtree.h.
za_co_codespot::datastructures::NaiveQuadtree< T >::NaiveQuadtree | ( | T | ar[], | |
unsigned int | width, | |||
unsigned int | height, | |||
T | threshold | |||
) |
Constructs a new quadtree from the given array. Only nodes with standard deviation higher than the threshold are split.
Definition at line 464 of file NaiveQuadtree.h.
unsigned int za_co_codespot::datastructures::NaiveQuadtree< T >::getHeight | ( | ) | const [inline] |
Returns the height of the rectangle that this quadtree represents.
Definition at line 484 of file NaiveQuadtree.h.
unsigned int za_co_codespot::datastructures::NaiveQuadtree< T >::getLevel | ( | unsigned int | x, | |
unsigned int | y | |||
) | const |
Returns the tree depth of the pixel (x, y). The root is at level 0.
Definition at line 534 of file NaiveQuadtree.h.
unsigned int za_co_codespot::datastructures::NaiveQuadtree< T >::getNodeCount | ( | ) | const |
Returns the number of nodes in the tree.
Definition at line 584 of file NaiveQuadtree.h.
unsigned int za_co_codespot::datastructures::NaiveQuadtree< T >::getWidth | ( | ) | const [inline] |
Returns the width of the rectangle that this quadtree represents.
Definition at line 478 of file NaiveQuadtree.h.
const T & za_co_codespot::datastructures::NaiveQuadtree< T >::operator() | ( | unsigned int | x, | |
unsigned int | y | |||
) | const |
Returns the node value containing the pixel (x, y).
Definition at line 528 of file NaiveQuadtree.h.