template<class T, class QueryModel = index::AutoRangeIndex<T>>
requires index::RangeIndex<QueryModel, T>
class clustering::DBSCAN< T, QueryModel >
Density-based clustering over the eps-neighborhood graph produced by a clustering::index::RangeIndex backend.
DBSCAN groups points whose eps-ball contains at least minPts neighbors into density- reachable clusters; points that fall outside any cluster are noise. The backend surfaces the whole adjacency in one call so this class never touches pairwise distances directly.
- Note
DBSCAN does NOT own X. The caller must keep the NDArray alive for the duration of every run call. Construction is stateless in X so a single DBSCAN instance can be reused across fits; repeated runs reallocate the label buffer only when n changes and keep the lazy thread pool spawned after the first parallel-eligible shape.
- Template Parameters
-
| T | Element type of the point cloud. |
| QueryModel | Range-index backend. Defaults to clustering::index::AutoRangeIndex, which picks a KD-Tree below bruteForceDimFloor and a blocked pairwise sweep at or above it. |
Definition at line 38 of file dbscan.h.
template<class T, class QueryModel = index::AutoRangeIndex<T>>
Fit to X.
Queries the backend for the full eps-neighbourhood adjacency, derives core-point flags from per-row degrees, then expands clusters sequentially via graph BFS over the adjacency. Remaining unclassified points are marked NOISY.
- Parameters
-
| X | Contiguous n x d dataset. The caller retains ownership; X must outlive this run call. |
- Warning
X must remain alive and unchanged for the full duration of this call.
Definition at line 78 of file dbscan.h.