Classes | Public Member Functions

za_co_codespot::datastructures::NaiveQuadtree< T > Class Template Reference

#include <NaiveQuadtree.h>

List of all members.

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

Detailed Description

template<typename T>
class za_co_codespot::datastructures::NaiveQuadtree< T >

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.

Template Parameters:
T A type of the Order2Statistical concept, for instance int or float.

Definition at line 28 of file NaiveQuadtree.h.


Constructor & Destructor Documentation

template<typename T >
za_co_codespot::datastructures::NaiveQuadtree< T >::NaiveQuadtree ( ar[],
unsigned int  width,
unsigned int  height,
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.


Member Function Documentation

template<typename T >
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.

template<typename T >
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.

template<typename T >
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.

template<typename T >
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.

template<typename T >
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.


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