Node definition. There exists two types of nodes: internal nodes partition the space by a cut plane defined by a value in one of the k dimensions; external nodes (aka buckets) store the points in the resulting hyperplanes of the partition. The variable bucket
is 1 if the node is a bucket and zero if it is an internal node.
In an internal node, cutdim
gives the dimension being partitioned, cutval
is a value in that dimension, and loson
and hison
are pointers to its two subtrees (containing respectively, points not greather than and not less than cutval
in that dimension).
In a bucket, the points that are contained in it are represented by indexes that are in the range perm[lopt,hipt]
. The global variable perm
is called as permutation vector. The number of points is represented by the expression hipt - lopt + 1
.
More...
#include <tdkdtree.h>
Data Fields | |
int | bucket |
int | cutdim |
double | cutval |
struct kdnode * | loson |
struct kdnode * | hison |
int | lopt |
int | hipt |
Node definition. There exists two types of nodes: internal nodes partition the space by a cut plane defined by a value in one of the k dimensions; external nodes (aka buckets) store the points in the resulting hyperplanes of the partition. The variable bucket
is 1 if the node is a bucket and zero if it is an internal node.
In an internal node, cutdim
gives the dimension being partitioned, cutval
is a value in that dimension, and loson
and hison
are pointers to its two subtrees (containing respectively, points not greather than and not less than cutval
in that dimension).
In a bucket, the points that are contained in it are represented by indexes that are in the range perm[lopt,hipt]
. The global variable perm
is called as permutation vector. The number of points is represented by the expression hipt - lopt + 1
.
Definition at line 41 of file tdkdtree.h.
int bucket |
Definition at line 43 of file tdkdtree.h.
int cutdim |
Definition at line 44 of file tdkdtree.h.
double cutval |
Definition at line 45 of file tdkdtree.h.
int hipt |
Definition at line 49 of file tdkdtree.h.
Definition at line 47 of file tdkdtree.h.
int lopt |
Definition at line 48 of file tdkdtree.h.
Definition at line 46 of file tdkdtree.h.