48         for (
int i = 0; i < level; i++)                         
 
   51         for (
int j = 0; j < 
n_bnds; j++) {                      
 
   54                         for (
int i = 0; i < level+2; i++) out << 
"  ";
 
   56                 out << 
"  ([" << 
bnds[j].
cd << 
"]" 
   57                          << (
bnds[j].
sd > 0 ? 
">=" : 
"< ")
 
  194         for (i = 0; i < 
dim; i++) {
 
  196                 if (length > max_length) {
 
  202         for (i = 0; i < 
dim; i++) {                                     
 
  207                         inner_box.
hi[i] = bnd_box.
hi[i];        
 
  212                 if (gap_lo < max_length*BD_GAP_THRESH)
 
  213                         inner_box.
lo[i] = bnd_box.
lo[i];        
 
  251         while (n_sub > n_goal) {                        
 
  256                 (*splitter)(pa, pidx, inner_box, n_sub, 
dim, cd, cv, n_lo);
 
  259                 if (n_lo >= n_sub/2) {                  
 
  260                         inner_box.hi[cd] = cv;          
 
  264                         inner_box.lo[cd] = cv;          
 
  363         if (decomp == 
SPLIT) {                          
 
  368                 (*splitter)(pa, pidx, bnd_box, n, 
dim, cd, cv, n_lo);
 
  376                                 dim, bsp, bnd_box, splitter, shrink);
 
  381                                 pa, pidx + n_lo, n-n_lo,
 
  382                                 dim, bsp, bnd_box, splitter, shrink);
 
  400                                 pa, pidx, n_in, dim, bsp, inner_box, splitter, shrink);
 
  402                                 pa, pidx+n_in, n - n_in, dim, bsp, bnd_box, splitter, shrink);
 
ANNdecomp trySimpleShrink(ANNpointArray pa, ANNidxArray pidx, int n, int dim, const ANNorthRect &bnd_box, ANNorthRect &inner_box)
 
DLL_API ANNpoint annCopyPt(int dim, ANNpoint source)
 
virtual void print(int level, ostream &out)
 
ANNdecomp selectDecomp(ANNpointArray pa, ANNidxArray pidx, int n, int dim, const ANNorthRect &bnd_box, ANNkd_splitter splitter, ANNshrinkRule shrink, ANNorthRect &inner_box)
 
ANNkd_ptr rbd_tree(ANNpointArray pa, ANNidxArray pidx, int n, int dim, int bsp, ANNorthRect &bnd_box, ANNkd_splitter splitter, ANNshrinkRule shrink)
 
ANNbd_tree(int n, int dd, int bs=1)
 
const float BD_MAX_SPLIT_FAC
 
void sl_midpt_split(ANNpointArray pa, ANNidxArray pidx, const ANNorthRect &bnds, int n, int dim, int &cut_dim, ANNcoord &cut_val, int &n_lo)
 
void midpt_split(ANNpointArray pa, ANNidxArray pidx, const ANNorthRect &bnds, int n, int dim, int &cut_dim, ANNcoord &cut_val, int &n_lo)
 
ANNdecomp tryCentroidShrink(ANNpointArray pa, ANNidxArray pidx, int n, int dim, const ANNorthRect &bnd_box, ANNkd_splitter splitter, ANNorthRect &inner_box)
 
void annAssignRect(int dim, ANNorthRect &dest, const ANNorthRect &source)
 
void fair_split(ANNpointArray pa, ANNidxArray pidx, const ANNorthRect &bnds, int n, int dim, int &cut_dim, ANNcoord &cut_val, int &n_lo)
 
const float BD_GAP_THRESH
 
virtual void getStats(int dim, ANNkdStats &st, ANNorthRect &bnd_box)
 
virtual void print(int level, ostream &out)=0
 
virtual void getStats(int dim, ANNkdStats &st, ANNorthRect &bnd_box)=0
 
void reset(int d=0, int n=0, int bs=0)
 
void kd_split(ANNpointArray pa, ANNidxArray pidx, const ANNorthRect &bnds, int n, int dim, int &cut_dim, ANNcoord &cut_val, int &n_lo)
 
void annEnclRect(ANNpointArray pa, ANNidxArray pidx, int n, int dim, ANNorthRect &bnds)
 
void annBox2Bnds(const ANNorthRect &inner_box, const ANNorthRect &bnd_box, int dim, int &n_bnds, ANNorthHSArray &bnds)
 
void annError(const char *msg, ANNerr level)
 
void annBoxSplit(ANNpointArray pa, ANNidxArray pidx, int n, int dim, ANNorthRect &box, int &n_in)
 
void(* ANNkd_splitter)(ANNpointArray pa, ANNidxArray pidx, const ANNorthRect &bnds, int n, int dim, int &cut_dim, ANNcoord &cut_val, int &n_lo)
 
void annBnds2Box(const ANNorthRect &bnd_box, int dim, int n_bnds, ANNorthHSArray bnds, ANNorthRect &inner_box)
 
void sl_fair_split(ANNpointArray pa, ANNidxArray pidx, const ANNorthRect &bnds, int n, int dim, int &cut_dim, ANNcoord &cut_val, int &n_lo)
 
void merge(const ANNkdStats &st)