pub struct PatternDetector { /* private fields */ }Expand description
High-performance temporal pattern detector
Implementations§
Source§impl PatternDetector
impl PatternDetector
Sourcepub fn new(config: PatternConfig) -> Self
pub fn new(config: PatternConfig) -> Self
Create a new pattern detector
Sourcepub fn detect_pattern(
&self,
memory_area_idx: u32,
upstream_areas: &[u32],
_current_timestep: u64,
timestep_bitmaps: Vec<HashSet<u32>>,
temporal_depth: Option<u32>,
) -> Option<TemporalPattern>
pub fn detect_pattern( &self, memory_area_idx: u32, upstream_areas: &[u32], _current_timestep: u64, timestep_bitmaps: Vec<HashSet<u32>>, temporal_depth: Option<u32>, ) -> Option<TemporalPattern>
Detect temporal pattern from firing history
Sourcepub fn configure_area_temporal_depth(
&self,
memory_area_idx: u32,
temporal_depth: u32,
)
pub fn configure_area_temporal_depth( &self, memory_area_idx: u32, temporal_depth: u32, )
Configure temporal depth for a specific memory area
Sourcepub fn get_stats(&self) -> PatternDetectorStats
pub fn get_stats(&self) -> PatternDetectorStats
Get detection statistics
Sourcepub fn clear_cache(&self)
pub fn clear_cache(&self)
Clear pattern cache
Sourcepub fn reset_stats(&self)
pub fn reset_stats(&self)
Reset statistics
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PatternDetector
impl RefUnwindSafe for PatternDetector
impl Send for PatternDetector
impl Sync for PatternDetector
impl Unpin for PatternDetector
impl UnsafeUnpin for PatternDetector
impl UnwindSafe for PatternDetector
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 more