The Cuik KD-Tree Library


TKDtree Struct Reference

A KD-tree. More...

#include <cuik-kdtree.h>

Collaboration diagram for TKDtree:

Data Fields

boolean isLeaf
unsigned int nd
unsigned int n
unsigned int m
double r
Trectangle ambient
unsigned int height
double volume
unsigned int splitDim
double splitValue
void * left
void * right
void * leftLeaf
void * rightLeaf
void * nextLeaf
double ** p
unsigned int * id
Trectangle boundingBox
Trectangle samplingArea

Detailed Description

This structure is used to represent a kd-tree or any kd-sub-tree, including leaves.

For simplicity reasons, we us a recursive implementation of most of the methods for the kd-tree.

Note that our implementation of the kd-tree does not include the points but only pointer to them.

Definition at line 36 of file cuik-kdtree.h.


Field Documentation

TRUE if the sub-tree is a leaf

Definition at line 37 of file cuik-kdtree.h.

Referenced by AddPoint2KDtree(), BuildKDTree(), DeleteKDtree(), SampleInKDtree(), SearchInBallKDtree(), and SearchKDtree().

unsigned int nd

Dimension of the ponits.

Definition at line 40 of file cuik-kdtree.h.

Referenced by AddPoint2KDtree(), BuildKDTree(), SearchInBallKDtree(), and SearchKDtree().

unsigned int n

Number of points in this sub-tree.

Definition at line 41 of file cuik-kdtree.h.

Referenced by AddPoint2KDtree(), BuildKDTree(), NearestNeighbour(), NeighboursInBall(), SearchInBallKDtree(), and SearchKDtree().

unsigned int m

Maximum number of points in the leaves.

Definition at line 42 of file cuik-kdtree.h.

Referenced by AddPoint2KDtree(), and BuildKDTree().

double r

The expansion factor to use in the sampling.

Definition at line 43 of file cuik-kdtree.h.

Referenced by AddPoint2KDtree(), and BuildKDTree().

Box defining the ambient space for all points.

Definition at line 44 of file cuik-kdtree.h.

Referenced by AddPoint2KDtree(), BuildKDTree(), DeleteKDtree(), SearchInBallKDtree(), and SearchKDtree().

unsigned int height

Height of this sub-tree.

Definition at line 45 of file cuik-kdtree.h.

Referenced by AddPoint2KDtree(), and BuildKDTree().

double volume

Volume of the sampling area.

Definition at line 46 of file cuik-kdtree.h.

Referenced by AddPoint2KDtree(), BuildKDTree(), and SampleInKDtree().

unsigned int splitDim

Dimension used to split the points.

Definition at line 49 of file cuik-kdtree.h.

Referenced by AddPoint2KDtree(), BuildKDTree(), SearchInBallKDtree(), and SearchKDtree().

double splitValue

Value used to split the points.

Definition at line 50 of file cuik-kdtree.h.

Referenced by AddPoint2KDtree(), and BuildKDTree().

void* left

Left sub-tree.

Definition at line 51 of file cuik-kdtree.h.

Referenced by AddPoint2KDtree(), BuildKDTree(), DeleteKDtree(), SampleInKDtree(), SearchInBallKDtree(), and SearchKDtree().

void* right

Rght sub-tree.

Definition at line 52 of file cuik-kdtree.h.

Referenced by AddPoint2KDtree(), BuildKDTree(), DeleteKDtree(), SampleInKDtree(), SearchInBallKDtree(), and SearchKDtree().

void* leftLeaf

Left-most leaf in the sub-tree.

Definition at line 53 of file cuik-kdtree.h.

Referenced by AddPoint2KDtree(), and BuildKDTree().

void* rightLeaf

Right-most leaf inthe sub-tree.

Definition at line 54 of file cuik-kdtree.h.

Referenced by AddPoint2KDtree(), and BuildKDTree().

void* nextLeaf

Next leaf in the tree.

Definition at line 57 of file cuik-kdtree.h.

Referenced by AddPoint2KDtree(), and BuildKDTree().

double** p

Points in the leaf.

Definition at line 58 of file cuik-kdtree.h.

Referenced by AddPoint2KDtree(), BuildKDTree(), DeleteKDtree(), SearchInBallKDtree(), and SearchKDtree().

unsigned int* id

Identifiers of the points in the leaf.

Definition at line 59 of file cuik-kdtree.h.

Referenced by AddPoint2KDtree(), BuildKDTree(), DeleteKDtree(), SearchInBallKDtree(), and SearchKDtree().

Actual bouding box for the points.

Definition at line 60 of file cuik-kdtree.h.

Referenced by AddPoint2KDtree(), BuildKDTree(), DeleteKDtree(), SearchInBallKDtree(), and SearchKDtree().

Sampling box.

Definition at line 61 of file cuik-kdtree.h.

Referenced by AddPoint2KDtree(), BuildKDTree(), DeleteKDtree(), and SampleInKDtree().


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