use std::time::Instant;
#[derive(Debug, Clone)]
pub struct StreamConfig {
pub window_size: usize,
pub min_observations: usize,
pub update_frequency: usize,
pub memory_threshold: usize,
pub adaptive_windowing: bool,
pub change_detection_threshold: f64,
}
impl Default for StreamConfig {
fn default() -> Self {
Self {
window_size: 1000,
min_observations: 10,
update_frequency: 10,
memory_threshold: 10000,
adaptive_windowing: false,
change_detection_threshold: 3.0,
}
}
}
#[derive(Debug, Clone)]
pub struct ChangePoint {
pub index: usize,
pub timestamp: Option<Instant>,
pub confidence: f64,
pub change_type: ChangeType,
}
#[derive(Debug, Clone)]
pub enum ChangeType {
MeanShift,
VarianceShift,
TrendChange,
SeasonalityChange,
StructuralBreak,
}