Struct StatisticsManager
pub struct StatisticsManager {
pub hh: RuleStats,
pub omega: RuleStats,
pub elim: RuleStats,
/* private fields */
}Expand description
Manages statistics and state for all reduction rules
Fields§
§hh: RuleStats§omega: RuleStats§elim: RuleStatsImplementations§
§impl StatisticsManager
impl StatisticsManager
pub fn new() -> Self
pub fn new() -> Self
Create a new StatisticsManager
pub fn reset(&mut self)
pub fn reset(&mut self)
Reset all counters
pub fn set_enabled(&mut self, enabled: bool)
pub fn set_enabled(&mut self, enabled: bool)
Set the global reduction switch
pub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Check if reduction is enabled
pub fn record_attempt(&mut self, rule: RuleType)
pub fn record_attempt(&mut self, rule: RuleType)
Record an attempt for a rule
pub fn record_success(&mut self, rule: RuleType)
pub fn record_success(&mut self, rule: RuleType)
Record a successful reduction
pub fn get_hit_rate(&self) -> f64
pub fn get_hit_rate(&self) -> f64
Get overall hit rate as a percentage
pub fn total_attempts(&self) -> usize
pub fn total_successes(&self) -> usize
Trait Implementations§
§impl Clone for StatisticsManager
impl Clone for StatisticsManager
§impl Debug for StatisticsManager
impl Debug for StatisticsManager
§impl Default for StatisticsManager
impl Default for StatisticsManager
Auto Trait Implementations§
impl Freeze for StatisticsManager
impl RefUnwindSafe for StatisticsManager
impl Send for StatisticsManager
impl Sync for StatisticsManager
impl Unpin for StatisticsManager
impl UnsafeUnpin for StatisticsManager
impl UnwindSafe for StatisticsManager
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