19using point_t = std::vector< double >;
20using indexArr = std::vector< size_t >;
21using pointIndex =
typename std::pair< std::vector< double >,
size_t >;
25 using KDNodePtr = std::shared_ptr< KDNode >;
33 KDNode(
const point_t &,
const size_t &,
const KDNodePtr &,
35 KDNode(
const pointIndex &,
const KDNodePtr &,
const KDNodePtr &);
39 double coord(
const size_t &);
42 explicit operator bool();
43 explicit operator point_t();
44 explicit operator size_t();
45 explicit operator pointIndex();
48using KDNodePtr = std::shared_ptr< KDNode >;
50KDNodePtr NewKDNodePtr();
53inline double dist2(
const point_t &,
const point_t &);
54inline double dist2(
const KDNodePtr &,
const KDNodePtr &);
57inline double dist(
const point_t &,
const point_t &);
58inline double dist(
const KDNodePtr &,
const KDNodePtr &);
64 explicit comparer(
size_t idx_);
65 inline bool compare_idx(
66 const std::pair< std::vector< double >,
size_t > &,
67 const std::pair< std::vector< double >,
size_t > &
71using pointIndexArr =
typename std::vector< pointIndex >;
73inline void sort_on_idx(
const pointIndexArr::iterator &,
74 const pointIndexArr::iterator &,
77using pointVec = std::vector< point_t >;
83 KDNodePtr make_tree(
const pointIndexArr::iterator &begin,
84 const pointIndexArr::iterator &end,
91 explicit KDTree(pointVec point_array);
95 const KDNodePtr &branch,
98 const KDNodePtr &best,
99 const double &best_dist
104 KDNodePtr nearest_(
const point_t &pt);
107 point_t nearest_point(
const point_t &pt);
108 size_t nearest_index(
const point_t &pt);
109 pointIndex nearest_pointIndex(
const point_t &pt);
113 pointIndexArr neighborhood_(
114 const KDNodePtr &branch,
121 pointIndexArr neighborhood(
125 pointVec neighborhood_points(
129 indexArr neighborhood_indices(
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:32:36 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.