Skip to main content

StandardConfidenceScheduler

Struct StandardConfidenceScheduler 

Source
pub struct StandardConfidenceScheduler { /* private fields */ }
Expand description

Standard implementation of confidence scheduler

Implementations§

Source§

impl StandardConfidenceScheduler

Source

pub fn new(config: ConfidenceSchedulerConfig) -> Self

Source

pub fn with_default_config() -> Self

Source

pub fn calculate_decay(confidence: f32, hours: f32) -> f32

Calculate decayed confidence

Source

pub fn calculate_age_hours(created_at_ms: i64, now_ms: i64) -> f32

Calculate age in hours from a timestamp

Trait Implementations§

Source§

impl ConfidenceScheduler for StandardConfidenceScheduler

Source§

fn apply_decay_to_capsule(&self, capsule_confidence: f32, age_hours: f32) -> f32

Apply confidence decay to a single capsule
Source§

fn boost_confidence(&self, current: f32) -> f32

Boost confidence on successful reuse
Source§

fn should_quarantine(&self, confidence: f32) -> bool

Check if confidence is below minimum threshold

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.