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
50
51
52
53
54
55
56
//! Spectral sanity helpers (feature-gated).
//!
//! These utilities are intentionally lightweight and *do not* change any default behavior.
//! They can be used by callers that already have eigenvalue sequences (e.g. from PCA/covariance).
//!
//! # Status: building block, no shipped consumer
//!
//! The only in-tree consumer is `estimate_signal_dimensions` in
//! [`crate::adsampling`], which feeds [`crate::adsampling::ADSamplingState::new_auto`].
//! That auto-construction path is exercised only by an internal test; no
//! example, bench, or integration test enables the `rmt-spectral` feature.
//! If you are evaluating the `rmt` dep cost, treat this module as
//! WATCH-tier: the feature exists, the math is correct, but no shipped
//! search path activates it today.
/// Marchenko–Pastur upper bulk edge \(\lambda_+\) for a sample covariance spectrum.
///
/// `ratio` is \(\gamma = p/n\) (features / samples). `sigma_sq` is the assumed noise variance.
///
/// This uses `rmt::marchenko_pastur_support` and returns only \(\lambda_+\).
// dead under `--features rmt-spectral` alone; consumed by adsampling
/// Count eigenvalues strictly above the MP bulk edge (optionally with a multiplicative margin).
///
/// Input eigenvalues must be real-valued; order does not matter.
// dead under `--features rmt-spectral` alone; consumed by adsampling