pub struct DecayManager { /* private fields */ }Expand description
Manages confidence decay of patterns over time.
Implementations§
Source§impl DecayManager
impl DecayManager
pub fn new(config: DecayConfig) -> Self
pub fn apply_decay(&self, pattern: &mut Pattern) -> f64
pub fn apply_usage_boost(&self, pattern: &mut Pattern, success: bool) -> f64
pub fn should_prune(&self, pattern: &Pattern) -> bool
pub fn decay_report(&self, patterns: &[&Pattern]) -> DecayReport
Trait Implementations§
Source§impl Debug for DecayManager
impl Debug for DecayManager
Auto Trait Implementations§
impl Freeze for DecayManager
impl RefUnwindSafe for DecayManager
impl Send for DecayManager
impl Sync for DecayManager
impl Unpin for DecayManager
impl UnsafeUnpin for DecayManager
impl UnwindSafe for DecayManager
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