1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//! `covstream` is a fixed-dimension streaming covariance library with Lean-backed
//! specifications.
//!
//! The crate is built around two public entry points:
//!
//! - [`CovstreamState`] is the default user-facing API. It stores a chosen
//! [`MatrixLayout`] and returns buffers in that layout.
//! - [`CovstreamCore`] is the lower-level engine. It gives direct access to the
//! underlying state and explicit extraction methods for each layout.
//!
//! Safe ingest paths reject:
//!
//! - wrong sample dimensions
//! - malformed flat batch buffers
//! - non-finite inputs such as `NaN` and `Inf`
//!
//! Covariance and shrinkage extraction require at least two observed samples.
//! Until then the library returns [`CovstreamError::InsufficientSamples`].
//!
//! For higher-throughput pipelines that already validate inputs upstream, the
//! `trusted_finite` ingest methods skip finite-value checks while preserving
//! shape checks.
//!
//! Security and safety notes:
//!
//! - The crate does not perform network I/O, file I/O, subprocess execution, or
//! environment-based configuration in its library API.
//! - The checked ingest paths validate dimensions and reject non-finite values.
//! - The only `unsafe` code is isolated to optional AArch64 SIMD leaf kernels in
//! `src/kernels.rs`.
pub use CovstreamCore;
pub use CovstreamError;
pub use MatrixLayout;
pub use ;
pub use CovstreamState;