|
Clustering
C++20 header-only: DBSCAN, HDBSCAN, k-means.
|
Range-index backend that builds the full eps-neighborhood adjacency in one fused pairwise sweep. More...
#include <clustering/index/brute_force_pairwise.h>
Public Member Functions | |
| BruteForcePairwise (const NDArray< T, 2 > &points) noexcept | |
| Constructs the backend over a borrowed point matrix. | |
| std::vector< std::vector< std::int32_t > > | query (T radius, math::Pool pool) const |
| Returns the full radius-neighborhood adjacency over the indexed point cloud. | |
Range-index backend that builds the full eps-neighborhood adjacency in one fused pairwise sweep.
At high dim, where tree pruning collapses, a blocked pairwise sweep with the eps-threshold fused into the microkernel epilogue is the right primitive for DBSCAN: core-point detection and cluster expansion both reduce to adjacency lookups, so one N*N sweep retires all the pairwise compute the algorithm needs.
| T | Element type of the point cloud (float or double). |
points alive for the lifetime of the BruteForcePairwise. Definition at line 28 of file brute_force_pairwise.h.
|
inlineexplicitnoexcept |
Constructs the backend over a borrowed point matrix.
| points | Row-major n x d point matrix. Must outlive the instance. |
Definition at line 38 of file brute_force_pairwise.h.
|
inlinenodiscard |
Returns the full radius-neighborhood adjacency over the indexed point cloud.
Emits surviving (i, j) pairs directly from the fused AVX2 threshold kernel; the outer driver partitions X rows across pool so per-row pushes are race-free.
| radius | Non-negative neighbourhood radius; comparison runs on the squared distance. |
| pool | Parallelism injection forwarded to the thresholded sweep. |
n vector where element i lists every j with ||x_i - x_j||^2 <= radius^2. Definition at line 51 of file brute_force_pairwise.h.