kd_split.h
Go to the documentation of this file.
1 //----------------------------------------------------------------------
2 // File: kd_split.h
3 // Programmer: Sunil Arya and David Mount
4 // Description: Methods for splitting kd-trees
5 // Last modified: 01/04/05 (Version 1.0)
6 //----------------------------------------------------------------------
7 // Copyright (c) 1997-2005 University of Maryland and Sunil Arya and
8 // David Mount. All Rights Reserved.
9 //
10 // This software and related documentation is part of the Approximate
11 // Nearest Neighbor Library (ANN). This software is provided under
12 // the provisions of the Lesser GNU Public License (LGPL). See the
13 // file ../ReadMe.txt for further information.
14 //
15 // The University of Maryland (U.M.) and the authors make no
16 // representations about the suitability or fitness of this software for
17 // any purpose. It is provided "as is" without express or implied
18 // warranty.
19 //----------------------------------------------------------------------
20 // History:
21 // Revision 0.1 03/04/98
22 // Initial release
23 //----------------------------------------------------------------------
24 
25 #ifndef ANN_KD_SPLIT_H
26 #define ANN_KD_SPLIT_H
27 
28 #include "kd_tree.h" // kd-tree definitions
29 
30 //----------------------------------------------------------------------
31 // External entry points
32 // These are all splitting procedures for kd-trees.
33 //----------------------------------------------------------------------
34 
35 void kd_split( // standard (optimized) kd-splitter
36  ANNpointArray pa, // point array (unaltered)
37  ANNidxArray pidx, // point indices (permuted on return)
38  const ANNorthRect &bnds, // bounding rectangle for cell
39  int n, // number of points
40  int dim, // dimension of space
41  int &cut_dim, // cutting dimension (returned)
42  ANNcoord &cut_val, // cutting value (returned)
43  int &n_lo); // num of points on low side (returned)
44 
45 void midpt_split( // midpoint kd-splitter
46  ANNpointArray pa, // point array (unaltered)
47  ANNidxArray pidx, // point indices (permuted on return)
48  const ANNorthRect &bnds, // bounding rectangle for cell
49  int n, // number of points
50  int dim, // dimension of space
51  int &cut_dim, // cutting dimension (returned)
52  ANNcoord &cut_val, // cutting value (returned)
53  int &n_lo); // num of points on low side (returned)
54 
55 void sl_midpt_split( // sliding midpoint kd-splitter
56  ANNpointArray pa, // point array (unaltered)
57  ANNidxArray pidx, // point indices (permuted on return)
58  const ANNorthRect &bnds, // bounding rectangle for cell
59  int n, // number of points
60  int dim, // dimension of space
61  int &cut_dim, // cutting dimension (returned)
62  ANNcoord &cut_val, // cutting value (returned)
63  int &n_lo); // num of points on low side (returned)
64 
65 void fair_split( // fair-split kd-splitter
66  ANNpointArray pa, // point array (unaltered)
67  ANNidxArray pidx, // point indices (permuted on return)
68  const ANNorthRect &bnds, // bounding rectangle for cell
69  int n, // number of points
70  int dim, // dimension of space
71  int &cut_dim, // cutting dimension (returned)
72  ANNcoord &cut_val, // cutting value (returned)
73  int &n_lo); // num of points on low side (returned)
74 
75 void sl_fair_split( // sliding fair-split kd-splitter
76  ANNpointArray pa, // point array (unaltered)
77  ANNidxArray pidx, // point indices (permuted on return)
78  const ANNorthRect &bnds, // bounding rectangle for cell
79  int n, // number of points
80  int dim, // dimension of space
81  int &cut_dim, // cutting dimension (returned)
82  ANNcoord &cut_val, // cutting value (returned)
83  int &n_lo); // num of points on low side (returned)
84 
85 #endif
void sl_midpt_split(ANNpointArray pa, ANNidxArray pidx, const ANNorthRect &bnds, int n, int dim, int &cut_dim, ANNcoord &cut_val, int &n_lo)
Definition: kd_split.cpp:146
void kd_split(ANNpointArray pa, ANNidxArray pidx, const ANNorthRect &bnds, int n, int dim, int &cut_dim, ANNcoord &cut_val, int &n_lo)
Definition: kd_split.cpp:44
double ANNcoord
Definition: ANN.h:158
int dim
Definition: ann2fig.cpp:81
ANNpoint * ANNpointArray
Definition: ANN.h:376
void sl_fair_split(ANNpointArray pa, ANNidxArray pidx, const ANNorthRect &bnds, int n, int dim, int &cut_dim, ANNcoord &cut_val, int &n_lo)
Definition: kd_split.cpp:346
ANNidx * ANNidxArray
Definition: ANN.h:378
void fair_split(ANNpointArray pa, ANNidxArray pidx, const ANNorthRect &bnds, int n, int dim, int &cut_dim, ANNcoord &cut_val, int &n_lo)
Definition: kd_split.cpp:243
void midpt_split(ANNpointArray pa, ANNidxArray pidx, const ANNorthRect &bnds, int n, int dim, int &cut_dim, ANNcoord &cut_val, int &n_lo)
Definition: kd_split.cpp:76


xiaoqiang_depth_image_proc
Author(s): Xie fusheng
autogenerated on Mon Jun 10 2019 15:53:04