rustkernel_temporal/
lib.rs1#![warn(missing_docs)]
24
25pub mod decomposition;
26pub mod detection;
27pub mod forecasting;
28pub mod messages;
29pub mod ring_messages;
30pub mod types;
31pub mod volatility;
32
33pub mod prelude {
35 pub use crate::decomposition::*;
36 pub use crate::detection::*;
37 pub use crate::forecasting::*;
38 pub use crate::messages::*;
39 pub use crate::ring_messages::*;
40 pub use crate::types::*;
41 pub use crate::volatility::*;
42}
43
44pub use decomposition::{SeasonalDecomposition, TrendExtraction};
46pub use detection::{ChangePointDetection, TimeSeriesAnomalyDetection};
47pub use forecasting::{ARIMAForecast, ProphetDecomposition};
48pub use volatility::VolatilityAnalysis;
49
50pub use types::{
52 ARIMAParams, ARIMAResult, AnomalyMethod, ChangePointMethod, ChangePointResult,
53 DecompositionResult, GARCHCoefficients, GARCHParams, ProphetResult, TimeSeries,
54 TimeSeriesAnomalyResult, TrendMethod, TrendResult, VolatilityResult,
55};
56
57pub fn register_all(
59 registry: &rustkernel_core::registry::KernelRegistry,
60) -> rustkernel_core::error::Result<()> {
61 tracing::info!("Registering temporal analysis kernels");
62
63 registry.register_batch_typed(forecasting::ARIMAForecast::new)?;
65 registry.register_batch_typed(forecasting::ProphetDecomposition::new)?;
66
67 registry.register_batch_typed(detection::ChangePointDetection::new)?; registry.register_ring_metadata_from(detection::TimeSeriesAnomalyDetection::new)?; registry.register_batch_typed(decomposition::SeasonalDecomposition::new)?;
73 registry.register_batch_typed(decomposition::TrendExtraction::new)?;
74
75 registry.register_ring_metadata_from(volatility::VolatilityAnalysis::new)?;
77
78 tracing::info!("Registered 7 temporal analysis kernels");
79 Ok(())
80}
81
82#[cfg(test)]
83mod tests {
84 use super::*;
85 use rustkernel_core::registry::KernelRegistry;
86
87 #[test]
88 fn test_register_all() {
89 let registry = KernelRegistry::new();
90 register_all(®istry).expect("Failed to register temporal kernels");
91 assert_eq!(registry.total_count(), 7);
92 }
93}