|
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. | |
| index::CoreAdjacency | query (T radius, std::size_t minPts, math::Pool pool) const |
| Returns the core-aware radius 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 31 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 41 of file brute_force_pairwise.h.
|
inlinenodiscard |
Returns the core-aware radius 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. Full two-sided degrees come from per-worker histograms over the upper halves, so core flags never need the mirrored edges materialized; only non-core rows receive their j < i neighbours, which the border-assignment scan is the sole reader of.
| 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 thresholded sweep. |
Definition at line 57 of file brute_force_pairwise.h.