nexus_stats_detection/
lib.rs1#![cfg_attr(not(feature = "std"), no_std)]
2#![warn(missing_docs)]
3
4#[cfg(feature = "alloc")]
15extern crate alloc;
16
17macro_rules! check_finite {
19 ($val:expr) => {
20 if !$val.is_finite() {
21 return Err(if $val.is_nan() {
22 nexus_stats_core::DataError::NotANumber
23 } else {
24 nexus_stats_core::DataError::Infinite
25 });
26 }
27 };
28}
29
30mod multi_gate;
32mod page_hinkley;
33mod robust_z;
34#[cfg(all(feature = "alloc", any(feature = "std", feature = "libm")))]
35mod simd_math;
36mod trend_alert;
37
38#[cfg(any(feature = "std", feature = "libm"))]
39mod adaptive_threshold;
40#[cfg(all(feature = "alloc", any(feature = "std", feature = "libm")))]
41mod adwin;
42#[cfg(all(feature = "alloc", any(feature = "std", feature = "libm")))]
43mod bocpd;
44#[cfg(all(feature = "alloc", any(feature = "std", feature = "libm")))]
45mod dist_drift;
46#[cfg(feature = "alloc")]
47mod mosum;
48#[cfg(any(feature = "std", feature = "libm"))]
49mod shiryaev_roberts;
50#[cfg(any(feature = "std", feature = "libm"))]
51mod sprt;
52
53pub mod detection {
55 pub use super::multi_gate::*;
56 pub use super::page_hinkley::*;
57 pub use super::robust_z::*;
58 pub use super::trend_alert::*;
59
60 #[cfg(any(feature = "std", feature = "libm"))]
61 pub use super::adaptive_threshold::*;
62 #[cfg(all(feature = "alloc", any(feature = "std", feature = "libm")))]
63 pub use super::adwin::*;
64 #[cfg(all(feature = "alloc", any(feature = "std", feature = "libm")))]
65 pub use super::bocpd::*;
66 #[cfg(all(feature = "alloc", any(feature = "std", feature = "libm")))]
67 pub use super::dist_drift::*;
68 #[cfg(feature = "alloc")]
69 pub use super::mosum::*;
70 #[cfg(any(feature = "std", feature = "libm"))]
71 pub use super::shiryaev_roberts::*;
72}
73
74pub mod signal;
76
77pub mod estimation {
79 #[cfg(any(feature = "std", feature = "libm"))]
80 pub use super::sprt::*;
81}