|
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, math::Pool pool={}) | |
| Constructs the policy, picking the backend once against points.dim(1). | |
| CoreAdjacency | query (T radius, std::size_t minPts, math::Pool pool) const |
| Returns the core-aware radius 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. |
| pool | Parallelism injection forwarded to the KDTree backend's build; the brute-force backend has no construction work to fan out. |
Definition at line 46 of file auto_range_index.h.
|
inlinenodiscard |
Returns the core-aware radius adjacency from the held backend.
| radius | Non-negative neighbourhood radius; comparison runs on the squared distance. |
| minPts | Core threshold on the self-inclusive neighbour count. |
| pool | Parallelism injection forwarded to the held backend. |
Definition at line 57 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.