Go to the source code of this file.
Functions | |
static mxArray * | new_array_from_kdforest (VlKDForest const *forest) |
static VlKDForest * | new_kdforest_from_array (mxArray const *forest_array, mxArray const *data_array) |
void | restore_parent_recursively (VlKDTree *tree, int nodeIndex, int *numNodesToVisit) |
Hepler function. |
static mxArray* new_array_from_kdforest | ( | VlKDForest const * | forest | ) | [static] |
------------------------------------------------------------------
Definition at line 64 of file toolbox/misc/kdtree.h.
static VlKDForest* new_kdforest_from_array | ( | mxArray const * | forest_array, |
mxArray const * | data_array | ||
) | [static] |
------------------------------------------------------------------
Definition at line 192 of file toolbox/misc/kdtree.h.
void restore_parent_recursively | ( | VlKDTree * | tree, |
int | nodeIndex, | ||
int * | numNodesToVisit | ||
) |
Hepler function.
------------------------------------------------------------------
tree | KDForest object to process |
nodeIndex | index of the KDForest node to start from |
numNodesToVisit | total number of nodes to visit. |
The function visits in depth first order the tree's nodes starting from the root, restoring the node parent pointers.
It also chekcs for tree consistency, aborting the MEX file in case of inconsistencies. Loops are detected by counting how many nodes have been visited so far compared to the total number of nodes in the tree.
Definition at line 27 of file toolbox/misc/kdtree.h.