53  void n_nearest(
const std::vector<double>& qv, 
const unsigned int nn,
 
   54                 std::vector<KDTreeResult>& result) 
const;
 
   64                              const unsigned int ndecorrel,
 
   65                              const unsigned int nn,
 
   66                              std::vector<KDTreeResult>& result) 
const;
 
   73  void r_nearest(
const std::vector<double>& qv, 
const double r2,
 
   74                 std::vector<KDTreeResult>& result) 
const;
 
   79                              const unsigned int ndecorrel, 
const double r2,
 
   80                              std::vector<KDTreeResult>& result) 
const;
 
 
  122  std::vector<std::array<double, 2> > 
box;
 
  129  void search_n(
const int idx0, 
const int nd, 
const unsigned int nn, 
double& r2,
 
  130                const std::vector<double>& qv, 
const KDTree& tree,
 
  131                std::priority_queue<KDTreeResult>& res) 
const;
 
  132  void search_r(
const int idx0, 
const int nd, 
const double r2,
 
  133                const std::vector<double>& qv, 
const KDTree& tree,
 
  134                std::vector<KDTreeResult>& res) 
const;
 
  139                           const std::vector<double>& qv) 
const;
 
  143                               const unsigned int nn, 
double& r2,
 
  144                               const std::vector<double>& qv,
 
  146                               std::priority_queue<KDTreeResult>& res) 
const;
 
  148                               const std::vector<double>& qv,
 
  150                               std::vector<KDTreeResult>& res) 
const;
 
 
void process_terminal_node_n(const int idx0, const int nd, const unsigned int nn, double &r2, const std::vector< double > &qv, const KDTree &tree, std::priority_queue< KDTreeResult > &res) const
std::vector< std::array< double, 2 > > box
void search_r(const int idx0, const int nd, const double r2, const std::vector< double > &qv, const KDTree &tree, std::vector< KDTreeResult > &res) const
KDTreeNode(int dim)
Constructor.
void search_n(const int idx0, const int nd, const unsigned int nn, double &r2, const std::vector< double > &qv, const KDTree &tree, std::priority_queue< KDTreeResult > &res) const
bool box_in_search_range(const double r2, const std::vector< double > &qv) const
void process_terminal_node_r(const int idx0, const int nd, const double r2, const std::vector< double > &qv, const KDTree &tree, std::vector< KDTreeResult > &res) const
const KDTreeArray & m_data
void n_nearest_around_point(const unsigned int idx, const unsigned int ndecorrel, const unsigned int nn, std::vector< KDTreeResult > &result) const
Search for nn nearest neighbours around a node of the input data, excluding neighbors within a decorr...
std::array< double, 2 > spread_in_coordinate(const int c, const int l, const int u) const
static constexpr int bucketsize
void r_nearest(const std::vector< double > &qv, const double r2, std::vector< KDTreeResult > &result) const
Search for all neighbors in a ball of size r2.
KDTreeNode * build_tree_for_range(int l, int u, KDTreeNode *parent)
KDTree(KDTreeArray &data_in)
Constructor.
std::vector< std::size_t > m_ind
void n_nearest(const std::vector< double > &qv, const unsigned int nn, std::vector< KDTreeResult > &result) const
Search for nn nearest neighbours around a point.
int select_on_coordinate_value(int c, double alpha, int l, int u)
void r_nearest_around_point(const unsigned int idx, const unsigned int ndecorrel, const double r2, std::vector< KDTreeResult > &result) const
Like r_nearest, but around an existing point, with decorrelation interval.
std::vector< std::vector< double > > KDTreeArray