Skip to main content

flow_utils/
lib.rs

1//! # flow-utils
2//!
3//! Shared algorithms and utilities for flow cytometry crates.
4//!
5//! This crate provides high-performance implementations of common algorithms used across
6//! multiple flow cytometry crates, including:
7//!
8//! - **Kernel Density Estimation (KDE)**: FFT-accelerated KDE with GPU support
9//! - **Clustering**: K-means, DBSCAN, Gaussian Mixture Model
10//! - **PCA**: Principal Component Analysis for dimensionality reduction
11//!
12//! ## Features
13//!
14//! - `gpu`: Enable GPU acceleration for KDE (requires burn and cubecl)
15
16pub mod kde;
17pub mod clustering;
18pub mod pca;
19pub mod common;
20
21pub use kde::{KernelDensity, KernelDensity2D, KdeError, KdeResult};
22pub use clustering::{
23    KMeans, KMeansConfig, KMeansResult,
24    Dbscan, DbscanConfig, DbscanResult,
25    Gmm, GmmConfig, GmmResult,
26    ClusteringError, ClusteringResult,
27};
28pub use pca::{Pca, PcaError, PcaResult};