KDTree< T > Class Template Reference

A generic static KD-tree. More...

#include <kdTree.h>

Inheritance diagram for KDTree< T >:

Inheritance graph
[legend]
Collaboration diagram for KDTree< T >:

Collaboration graph
[legend]

List of all members.

Classes

struct  Node
 Represents one node of the KD-tree. More...
class  PointHeap
 Performs a nearest-neighbour search by managing a heap from nodes of a KDTree. More...

Public Member Functions

 ~KDTree ()
 Only frees the memory.

Public Attributes

const int depth
 The depth of the tree = log2ceil(::count).
const int length
 The length of the vectors.
const int count
 The number of the vectors.

Protected Member Functions

 KDTree (int length_, int count_)
 Prepares to build a new KD-tree from count_ vectors of length_ elements.
 KDTree (KDTree &other)
 Copy constructor with moving semantics (destroys its argument).
int leafID2dataID (int leafID) const
 Takes an index of a "leaf" node (past the end of nodes) and returns the appropriate data ID.

Protected Attributes

Nodenodes
 The array of the tree-nodes (heap-like topology of the tree).
int * dataIDs
 Data IDs for children of "leaf" nodes.
Bounds bounds
 The bounding box for all the data.

Friends

class KDBuilder< T >


Detailed Description

template<class T>
class KDTree< T >

A generic static KD-tree.

Construction is done by KDBuilder::makeTree static method. The searching for nearest neighbours is performed by the PointHeap subclass.

Definition at line 83 of file kdTree.h.


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

Generated on Thu Aug 6 22:33:14 2009 for Fractal Image Compressor by  doxygen 1.5.8