Loading...
Searching...
No Matches
kdnode Struct Reference

Node for k-d tree. More...

`#include <kdtree.h>`

Collaboration diagram for kdnode:
[legend]

## Data Fields

unsigned char | dim
unsigned char | depth
unsigned char | balance
double * | c
int | uid
struct kdnode * | child [2]

## Detailed Description

Node for k-d tree.

Definition at line 67 of file kdtree.h.

## Field Documentation

## balance

unsigned char kdnode::balance

flag to indicate if balancing is needed

Definition at line 70 of file kdtree.h.

Referenced by kdtree_remove().

## c

double* kdnode::c

coordinates

Definition at line 71 of file kdtree.h.

Referenced by kdtree_dnn(), kdtree_insert(), kdtree_knn(), kdtree_remove(), and kdtree_rnn().

## child

struct kdnode* kdnode::child[2]

link to children: [0] for smaller, [1] for larger

Definition at line 74 of file kdtree.h.

Referenced by kdtree_clear(), kdtree_dnn(), kdtree_knn(), kdtree_optimize(), kdtree_remove(), and kdtree_rnn().

## depth

unsigned char kdnode::depth

depth at this node

Definition at line 69 of file kdtree.h.

Referenced by kdtree_optimize(), and kdtree_remove().

## dim

unsigned char kdnode::dim

split dimension of this node

Definition at line 68 of file kdtree.h.

Referenced by kdtree_dnn(), kdtree_knn(), kdtree_remove(), and kdtree_rnn().

## uid

int kdnode::uid

unique id of this node

Definition at line 72 of file kdtree.h.

Referenced by kdtree_dnn(), kdtree_insert(), kdtree_knn(), kdtree_remove(), kdtree_rnn(), and kdtree_traverse().

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

- kdtree.h