Kdtree2
Kdtree2 is k-d tree implementation by Matthew B. Kennel. The original paper is available at arXiv.
This module provides following data types:
This module provides following routines to create tree and destroy them.
Following methods are available for getting n-nearest neighbours.
Following methods are available for getting neighbours within radius r.
Following methods are available for counding points within radius r.
kdtree2_r_count
kdtree2_r_count_around_point
kdtree2_sort_results
All methodsβ
ποΈ Structure
The structure of Kdtree2_ is given below.
ποΈ Kdtree2Node
It denotes a node of Kdtree2_ k-d tree.
ποΈ Kdtree2Result
It contains the pair of value and index.
ποΈ Kdtree_Create
Create the actual tree structure by giving an input array of data.
ποΈ Kdtree2_Destroy
Destroy the k-d tree.
ποΈ Kdtree2_n_nearese
Find the 'nn' vectors in the tree nearest to 'qv' in euclidean norm
ποΈ Kdtree2_n_nearest_around_point
Find the nn vectors in the tree nearest to point idxin,
ποΈ Kdtree2_r_count
Count the number of neighbors within square distance 'r2'.
ποΈ Kdtree2_r_count_around_point
Count the number of neighbors within square distance 'r2'.
ποΈ Kdtree2_r_nearest
Find the nearest neighbors to point 'idxin', within SQUARED
ποΈ Kdtree2_r_nearest_around_point
Like Kdtree2rnearest, but around a point 'idxin' already existing in the data set.