#include <ANN.h>
Public Member Functions | |
ANNkd_tree (std::istream &in) | |
ANNkd_tree (ANNpointArray pa, int n, int dd, int bs=1, ANNsplitRule split=ANN_KD_SUGGEST) | |
ANNkd_tree (int n=0, int dd=0, int bs=1) | |
int | annkFRSearch (ANNpoint q, ANNdist sqRad, int k, ANNidxArray nn_idx=NULL, ANNdistArray dd=NULL, double eps=0.0) |
void | annkPriSearch (ANNpoint q, int k, ANNidxArray nn_idx, ANNdistArray dd, double eps=0.0) |
void | annkSearch (ANNpoint q, int k, ANNidxArray nn_idx, ANNdistArray dd, double eps=0.0) |
virtual void | Dump (ANNbool with_pts, std::ostream &out) |
virtual void | getStats (ANNkdStats &st) |
int | nPoints () |
virtual void | Print (ANNbool with_pts, std::ostream &out) |
int | theDim () |
ANNpointArray | thePoints () |
~ANNkd_tree () | |
Protected Member Functions | |
void | SkeletonTree (int n, int dd, int bs, ANNpointArray pa=NULL, ANNidxArray pi=NULL) |
Protected Attributes | |
int | bkt_size |
ANNpoint | bnd_box_hi |
ANNpoint | bnd_box_lo |
int | dim |
int | n_pts |
ANNidxArray | pidx |
ANNpointArray | pts |
ANNkd_ptr | root |
Definition at line 701 of file ANN.h.
ANNkd_tree::ANNkd_tree | ( | int | n = 0 , |
|
int | dd = 0 , |
|||
int | bs = 1 | |||
) |
Definition at line 273 of file kd_tree.cpp.
References SkeletonTree().
ANNkd_tree::ANNkd_tree | ( | ANNpointArray | pa, | |
int | n, | |||
int | dd, | |||
int | bs = 1 , |
|||
ANNsplitRule | split = ANN_KD_SUGGEST | |||
) |
Definition at line 368 of file kd_tree.cpp.
References ANN_KD_FAIR, ANN_KD_MIDPT, ANN_KD_SL_FAIR, ANN_KD_SL_MIDPT, ANN_KD_STD, ANN_KD_SUGGEST, ANNabort, annCopyPt(), annEnclRect(), annError(), bnd_box_hi, bnd_box_lo, fair_split(), ANNorthRect::hi, kd_split(), ANNorthRect::lo, midpt_split(), pidx, pts, rkd_tree(), root, SkeletonTree(), sl_fair_split(), and sl_midpt_split().
ANNkd_tree::ANNkd_tree | ( | std::istream & | in | ) |
Definition at line 188 of file kd_dump.cpp.
References annReadDump(), bnd_box_hi, bnd_box_lo, KD_TREE, root, and SkeletonTree().
ANNkd_tree::~ANNkd_tree | ( | ) |
Definition at line 209 of file kd_tree.cpp.
References annDeallocPt(), bnd_box_hi, bnd_box_lo, pidx, and root.
int ANNkd_tree::annkFRSearch | ( | ANNpoint | q, | |
ANNdist | sqRad, | |||
int | k, | |||
ANNidxArray | nn_idx = NULL , |
|||
ANNdistArray | dd = NULL , |
|||
double | eps = 0.0 | |||
) | [virtual] |
Implements ANNpointSet.
Definition at line 58 of file kd_fix_rad_search.cpp.
References ANN_FLOP, ANNkd_node::ann_FR_search(), ANN_POW, annBoxDistance(), ANNkdFRDim, ANNkdFRMaxErr, ANNkdFRPts, ANNkdFRPtsInRange, ANNkdFRPtsVisited, ANNkdFRQ, ANNkdFRSqRad, bnd_box_hi, bnd_box_lo, dim, ANNmin_k::ith_smallest_info(), ANNmin_k::ith_smallest_key(), pts, and root.
Referenced by main().
void ANNkd_tree::annkPriSearch | ( | ANNpoint | q, | |
int | k, | |||
ANNidxArray | nn_idx, | |||
ANNdistArray | dd, | |||
double | eps = 0.0 | |||
) |
Definition at line 87 of file kd_pr_search.cpp.
References ANN_FLOP, ANN_POW, annBoxDistance(), ANNmaxPtsVisited, ANNprDim, ANNprMaxErr, ANNprPts, ANNprQ, ANNptsVisited, bnd_box_hi, bnd_box_lo, dim, ANNpr_queue::extr_min(), ANNpr_queue::insert(), ANNmin_k::ith_smallest_info(), ANNmin_k::ith_smallest_key(), ANNmin_k::max_key(), n_pts, ANNpr_queue::non_empty(), pts, and root.
Referenced by main().
void ANNkd_tree::annkSearch | ( | ANNpoint | q, | |
int | k, | |||
ANNidxArray | nn_idx, | |||
ANNdistArray | dd, | |||
double | eps = 0.0 | |||
) | [virtual] |
Implements ANNpointSet.
Definition at line 89 of file kd_search.cpp.
References ANN_FLOP, ANN_POW, ANNkd_node::ann_search(), ANNabort, annBoxDistance(), annError(), ANNkdDim, ANNkdMaxErr, ANNkdPts, ANNkdQ, ANNptsVisited, bnd_box_hi, bnd_box_lo, dim, ANNmin_k::ith_smallest_info(), ANNmin_k::ith_smallest_key(), n_pts, pts, and root.
Referenced by best_fit::ANN(), and main().
void ANNkd_tree::Dump | ( | ANNbool | with_pts, | |
std::ostream & | out | |||
) | [virtual] |
Definition at line 104 of file kd_dump.cpp.
References ANNcoordPrec, annPrintPt(), ANNversion, bkt_size, bnd_box_hi, bnd_box_lo, dim, ANNkd_node::dump(), n_pts, pts, and root.
Referenced by main().
void ANNkd_tree::getStats | ( | ANNkdStats & | st | ) | [virtual] |
Definition at line 191 of file kd_tree.cpp.
References ANNkdStats::avg_ar, bkt_size, bnd_box_hi, bnd_box_lo, dim, ANNkd_node::getStats(), ANNkdStats::n_lf, n_pts, ANNkdStats::reset(), root, and ANNkdStats::sum_ar.
Referenced by treeStats().
int ANNkd_tree::nPoints | ( | ) | [inline, virtual] |
Implements ANNpointSet.
Definition at line 762 of file ANN.h.
References n_pts.
Referenced by main().
void ANNkd_tree::Print | ( | ANNbool | with_pts, | |
std::ostream & | out | |||
) | [virtual] |
Definition at line 104 of file kd_tree.cpp.
References annPrintPt(), ANNversion, dim, n_pts, ANNkd_node::print(), pts, and root.
Referenced by main().
void ANNkd_tree::SkeletonTree | ( | int | n, | |
int | dd, | |||
int | bs, | |||
ANNpointArray | pa = NULL , |
|||
ANNidxArray | pi = NULL | |||
) | [protected] |
Definition at line 244 of file kd_tree.cpp.
References bkt_size, bnd_box_hi, bnd_box_lo, dim, IDX_TRIVIAL, n_pts, pidx, pts, and root.
Referenced by ANNbd_tree::ANNbd_tree(), and ANNkd_tree().
int ANNkd_tree::theDim | ( | ) | [inline, virtual] |
ANNpointArray ANNkd_tree::thePoints | ( | ) | [inline, virtual] |
int ANNkd_tree::bkt_size [protected] |
Definition at line 705 of file ANN.h.
Referenced by Dump(), getStats(), and SkeletonTree().
ANNpoint ANNkd_tree::bnd_box_hi [protected] |
Definition at line 710 of file ANN.h.
Referenced by ANNbd_tree::ANNbd_tree(), ANNkd_tree(), annkFRSearch(), annkPriSearch(), annkSearch(), Dump(), getStats(), SkeletonTree(), and ~ANNkd_tree().
ANNpoint ANNkd_tree::bnd_box_lo [protected] |
Definition at line 709 of file ANN.h.
Referenced by ANNbd_tree::ANNbd_tree(), ANNkd_tree(), annkFRSearch(), annkPriSearch(), annkSearch(), Dump(), getStats(), SkeletonTree(), and ~ANNkd_tree().
int ANNkd_tree::dim [protected] |
Definition at line 703 of file ANN.h.
Referenced by annkFRSearch(), annkPriSearch(), annkSearch(), Dump(), getStats(), Print(), and SkeletonTree().
int ANNkd_tree::n_pts [protected] |
Definition at line 704 of file ANN.h.
Referenced by annkPriSearch(), annkSearch(), Dump(), getStats(), Print(), and SkeletonTree().
ANNidxArray ANNkd_tree::pidx [protected] |
Definition at line 707 of file ANN.h.
Referenced by ANNbd_tree::ANNbd_tree(), ANNkd_tree(), SkeletonTree(), and ~ANNkd_tree().
ANNpointArray ANNkd_tree::pts [protected] |
Definition at line 706 of file ANN.h.
Referenced by ANNbd_tree::ANNbd_tree(), ANNkd_tree(), annkFRSearch(), annkPriSearch(), annkSearch(), Dump(), Print(), and SkeletonTree().
ANNkd_ptr ANNkd_tree::root [protected] |
Definition at line 708 of file ANN.h.
Referenced by ANNbd_tree::ANNbd_tree(), ANNkd_tree(), annkFRSearch(), annkPriSearch(), annkSearch(), Dump(), getStats(), Print(), SkeletonTree(), and ~ANNkd_tree().