|
Clustering
C++20 header-only: DBSCAN, HDBSCAN, k-means.
|
Range-index policy that picks KDTree below a dimension threshold and BruteForcePairwise above it. More...
#include <clustering/index/auto_range_index.h>
Public Member Functions | |
| AutoRangeIndex (const NDArray< T, 2 > &points) | |
| Constructs the policy, picking the backend once against points.dim(1). | |
| std::vector< std::vector< std::int32_t > > | query (T radius, math::Pool pool) const |
| Returns the full radius-neighborhood adjacency from the held backend. | |
Static Public Attributes | |
| static constexpr std::size_t | bruteForceDimFloor = 16 |
| Dimension threshold at or above which the brute-force backend is selected. | |
Range-index policy that picks KDTree below a dimension threshold and BruteForcePairwise above it.
Above AutoRangeIndex::bruteForceDimFloor KDTree pruning collapses on the curse of dimensionality and a blocked pairwise sweep wins; below it the tree's log-depth walks are cheaper than an N*N sweep. The choice is made once at construction.
| T | Element type of the point cloud. |
Definition at line 25 of file auto_range_index.h.
|
inlineexplicit |
Constructs the policy, picking the backend once against points.dim(1).
| points | Row-major n x d point matrix. Must outlive the instance. |
Definition at line 44 of file auto_range_index.h.
|
inlinenodiscard |
Returns the full radius-neighborhood adjacency from the held backend.
| radius | Non-negative neighbourhood radius; comparison runs on the squared distance. |
| pool | Parallelism injection forwarded to the held backend. |
n vector where element i lists every j with ||x_i - x_j||^2 <= radius^2. Definition at line 54 of file auto_range_index.h.
|
staticconstexpr |
Dimension threshold at or above which the brute-force backend is selected.
Definition at line 36 of file auto_range_index.h.