rustpix-algorithms
Clustering algorithms with spatial indexing for neutron event detection.
Algorithms
ABS (Adjacency-Based Search)
Fast 8-connectivity clustering optimized for pixel detectors.
use AbsClustering;
let clustering = new; // spatial, temporal epsilon
let clusters = clustering.cluster;
DBSCAN
Density-based clustering with KD-tree spatial indexing.
use DbscanClustering;
let clustering = new; // eps, time_eps, min_pts
let clusters = clustering.cluster;
Graph
Union-find based connected component detection.
use GraphClustering;
let clustering = new;
let clusters = clustering.cluster;
Grid
Parallel grid-based clustering with spatial hashing.
use GridClustering;
let clustering = new;
let clusters = clustering.cluster;
Performance
| Algorithm | Speed | Memory | Best For |
|---|---|---|---|
| ABS | Fastest | Low | Dense clusters |
| DBSCAN | Moderate | Moderate | Variable density |
| Graph | Fast | Low | General purpose |
| Grid | Very Fast | Moderate | Large datasets, parallelism |
License
MIT License - see LICENSE for details.