Woolz Image Processing  Version 1.8.3
AlcKDTree.c File Reference

A general purpose, arbitrary dimension, integer/floating point binary space partition tree (kD-tree). More...

Functions

AlcKDTTreeAlcKDTTreeNew (AlcPointType type, int dim, double tol, size_t nNodes, AlcErrno *dstErr)
 Creates a KD-tree data structure. More...
 
int AlcKDTTreeFacts (AlcKDTTree *tree, FILE *fP)
 Prints facts about the kD-tree structure to a file. More...
 
AlcErrno AlcKDTTreeFree (AlcKDTTree *tree)
 Free's the given KD-tree data structure and any nodes in the tree. More...
 
AlcKDTNodeAlcKDTNodeNew (AlcKDTTree *tree, AlcKDTNode *parent, AlcPointP key, int cmp, AlcErrno *dstErr)
 Allocates a new node and sets it's fields. More...
 
void AlcKDTNodeFree (AlcKDTTree *tree, AlcKDTNode *node)
 Free's the given KD-tree node and all it's child nodes by pushing them onto the stack of available nodes. More...
 
AlcKDTNodeAlcKDTInsert (AlcKDTTree *tree, void *keyVal, AlcKDTNode **dstFndNod, AlcErrno *dstErr)
 Checks for a node in the tree with the given key, if such a node doesn't exist then insert a new one. More...
 
AlcKDTNodeAlcKDTGetMatch (AlcKDTTree *tree, void *keyVal, AlcErrno *dstErr)
 Searches for a node with a matching key to the given key. More...
 
AlcKDTNodeAlcKDTGetLeaf (AlcKDTTree *tree, AlcKDTNode *node, AlcPointP key)
 Searches for the leaf node containing the given key. progressing downwards in the tree. More...
 
AlcKDTNodeAlcKDTGetNN (AlcKDTTree *tree, void *keyVal, double minDist, double *dstNNDist, AlcErrno *dstErr)
 Searches for the nearest neighbour node to the given key within the tree. More...
 

Detailed Description

A general purpose, arbitrary dimension, integer/floating point binary space partition tree (kD-tree).

Author
Bill Hill
Date
November 2000
Version
Id
36858cc2dba00498a3c8b36cdf789a556970b012
Address: MRC Human Genetics Unit, MRC Institute of Genetics and Molecular Medicine, University of Edinburgh, Western General Hospital, Edinburgh, EH4 2XU, UK.
Copyright (C), [2012], The University Court of the University of Edinburgh, Old College, Edinburgh, UK.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.