Skip to main content

legume_numeric/
lib.rs

1//! Numeric / ML foundation for the legume ecosystem.
2//!
3//! Modules:
4//! - [`leiden`] — vendored CWTS/10x Leiden port (see `NOTICE`)
5//! - [`matrix`] — matrix IO, KNN, layout, stats (ex `matrix-util`)
6//! - [`param`] — parametric helpers (ex `matrix-param`)
7//! - [`candle`] — candle training helpers (ex `candle-util`; feature `candle`)
8//! - [`mcmc`] — MCMC engine (ex `mcmc-util`; feature `mcmc`)
9//!
10//! Features: `matrix` and `param` need no candle. `tensor` (default) adds
11//! candle `Tensor` support to the matrix code: conversions, tensor IO,
12//! sampling and fused ops. `candle` and `mcmc` build on `tensor`. A crate
13//! that only needs matrices sets `default-features = false` and links no
14//! candle at all.
15
16pub mod leiden;
17
18/// candle-core, for crates that use `Tensor` through the `tensor` feature
19/// without a direct dependency on candle.
20#[cfg(feature = "tensor")]
21pub use candle_core;
22
23#[cfg(feature = "matrix")]
24pub mod matrix;
25
26#[cfg(feature = "param")]
27pub mod param;
28
29#[cfg(feature = "candle")]
30pub mod candle;
31
32#[cfg(feature = "mcmc")]
33pub mod mcmc;