Woolz Image Processing Version 1.4.0
AlcKDTree.c File Reference

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

Defines

#define ALC_KDT_SPHEREINTERSECT_TEST

Functions

AlcKDTTreeAlcKDTTreeNew (AlcPointType type, int dim, double tol, size_t nNodes, AlcErrno *dstErr)
 Creates a KD-tree data structure.
int AlcKDTTreeFacts (AlcKDTTree *tree, FILE *fP)
 Prints facts about the kD-tree structure to a file.
AlcErrno AlcKDTTreeFree (AlcKDTTree *tree)
 Free's the given KD-tree data structure and any nodes in the tree.
AlcKDTNodeAlcKDTNodeNew (AlcKDTTree *tree, AlcKDTNode *parent, AlcPointP key, int cmp, AlcErrno *dstErr)
 Allocates a new node and sets it's fields.
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.
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.
AlcKDTNodeAlcKDTGetMatch (AlcKDTTree *tree, void *keyVal, AlcErrno *dstErr)
 Searches for a node with a matching key to the given key.
AlcKDTNodeAlcKDTGetLeaf (AlcKDTTree *tree, AlcKDTNode *node, AlcPointP key)
 Searches for the leaf node containing the given key. progressing downwards in the tree.
AlcKDTNodeAlcKDTGetNN (AlcKDTTree *tree, void *keyVal, double minDist, double *dstNNDist, AlcErrno *dstErr)
 Searches for the nearest neighbour node to the given key within the tree.

Detailed Description

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

Author:
Bill Hill
Date:
November 2000
Version:
Id:
10413d177d8108e03b5652485e29023a6b0d5f39
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.


Define Documentation

#define ALC_KDT_SPHEREINTERSECT_TEST