pub struct StreamingAnalyzer<F: Float + Debug> { /* private fields */ }Expand description
Core streaming time series analyzer
This is the main interface for streaming time series analysis, providing a unified API for real-time analysis capabilities.
Implementations§
Source§impl<F: Float + Debug + Clone + FromPrimitive> StreamingAnalyzer<F>
impl<F: Float + Debug + Clone + FromPrimitive> StreamingAnalyzer<F>
Sourcepub fn new(config: StreamConfig) -> Result<Self>
pub fn new(config: StreamConfig) -> Result<Self>
Create new streaming analyzer with default configuration
Sourcepub fn add_observation(&mut self, value: F) -> Result<()>
pub fn add_observation(&mut self, value: F) -> Result<()>
Add new observation to the analyzer
Sourcepub fn get_stats(&self) -> &OnlineStats<F>
pub fn get_stats(&self) -> &OnlineStats<F>
Get current statistics
Sourcepub fn detect_change(&self) -> bool
pub fn detect_change(&self) -> bool
Check for change points
Sourcepub fn get_change_signal(&self) -> (F, F)
pub fn get_change_signal(&self) -> (F, F)
Get change detection signal value
Sourcepub fn get_buffer(&self) -> &VecDeque<F>
pub fn get_buffer(&self) -> &VecDeque<F>
Get recent observations buffer
Sourcepub fn get_config(&self) -> &StreamConfig
pub fn get_config(&self) -> &StreamConfig
Get configuration
Sourcepub fn time_since_update(&self) -> Duration
pub fn time_since_update(&self) -> Duration
Get time since last update
Sourcepub fn cleanup_memory(&mut self)
pub fn cleanup_memory(&mut self)
Perform automatic memory cleanup if threshold is reached
Sourcepub fn get_change_points(&self) -> Vec<ChangePoint>
pub fn get_change_points(&self) -> Vec<ChangePoint>
Get change points (compatibility method)
Sourcepub fn is_outlier(&self, value: F) -> bool
pub fn is_outlier(&self, value: F) -> bool
Check if a value is an outlier (simple implementation)
Sourcepub fn forecast(&self, _steps: usize) -> Result<Array1<F>>
pub fn forecast(&self, _steps: usize) -> Result<Array1<F>>
Simple forecast method (compatibility)
Sourcepub fn observation_count(&self) -> usize
pub fn observation_count(&self) -> usize
Get observation count
Sourcepub fn buffer_size(&self) -> usize
pub fn buffer_size(&self) -> usize
Get buffer size
Sourcepub fn time_since_last_update(&self) -> Duration
pub fn time_since_last_update(&self) -> Duration
Get time since last update (alias for compatibility)
Trait Implementations§
Auto Trait Implementations§
impl<F> Freeze for StreamingAnalyzer<F>where
F: Freeze,
impl<F> RefUnwindSafe for StreamingAnalyzer<F>where
F: RefUnwindSafe,
impl<F> Send for StreamingAnalyzer<F>where
F: Send,
impl<F> Sync for StreamingAnalyzer<F>where
F: Sync,
impl<F> Unpin for StreamingAnalyzer<F>where
F: Unpin,
impl<F> UnsafeUnpin for StreamingAnalyzer<F>where
F: UnsafeUnpin,
impl<F> UnwindSafe for StreamingAnalyzer<F>where
F: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.