Clustering
C++20 header-only: DBSCAN, HDBSCAN, k-means.
Loading...
Searching...
No Matches
clustering::index::AutoRangeIndex< T > Class Template Reference

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.

Detailed Description

template<class T>
class clustering::index::AutoRangeIndex< T >

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.

Template Parameters
TElement type of the point cloud.

Definition at line 25 of file auto_range_index.h.

Constructor & Destructor Documentation

◆ AutoRangeIndex()

template<class T>
clustering::index::AutoRangeIndex< T >::AutoRangeIndex ( const NDArray< T, 2 > & points,
math::Pool pool = {} )
inlineexplicit

Constructs the policy, picking the backend once against points.dim(1).

Parameters
pointsRow-major n x d point matrix. Must outlive the instance.
poolParallelism 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.

Member Function Documentation

◆ query()

template<class T>
CoreAdjacency clustering::index::AutoRangeIndex< T >::query ( T radius,
std::size_t minPts,
math::Pool pool ) const
inlinenodiscard

Returns the core-aware radius adjacency from the held backend.

Parameters
radiusNon-negative neighbourhood radius; comparison runs on the squared distance.
minPtsCore threshold on the self-inclusive neighbour count.
poolParallelism injection forwarded to the held backend.
Returns
Rows and core flags per the clustering::index::CoreAdjacency contract.

Definition at line 57 of file auto_range_index.h.

Member Data Documentation

◆ bruteForceDimFloor

template<class T>
std::size_t clustering::index::AutoRangeIndex< T >::bruteForceDimFloor = 16
staticconstexpr

Dimension threshold at or above which the brute-force backend is selected.

Definition at line 36 of file auto_range_index.h.


The documentation for this class was generated from the following file: