pub struct TemporalDecayConfig {
pub decay_rate: f32,
pub half_life_secs: f64,
pub semantic_weight: f32,
pub min_decay: f32,
pub apply_stage: DecayStage,
}Expand description
Configuration for temporal decay scoring
Fields§
§decay_rate: f32Decay rate (λ): 0.5 = half-life decay
half_life_secs: f64Half-life in seconds (τ): time for score to halve
semantic_weight: f32Semantic weight (α): 0.0 = pure recency, 1.0 = pure semantic
min_decay: f32Minimum decay score (floor)
apply_stage: DecayStageWhether to apply decay before or after other scoring
Implementations§
Source§impl TemporalDecayConfig
impl TemporalDecayConfig
Sourcepub fn short_term() -> Self
pub fn short_term() -> Self
Create config for short-term memory (fast decay)
Sourcepub fn working_memory() -> Self
pub fn working_memory() -> Self
Create config for working memory (very fast decay)
Sourcepub fn with_half_life(half_life_secs: f64, semantic_weight: f32) -> Self
pub fn with_half_life(half_life_secs: f64, semantic_weight: f32) -> Self
Create config with custom half-life
Trait Implementations§
Source§impl Clone for TemporalDecayConfig
impl Clone for TemporalDecayConfig
Source§fn clone(&self) -> TemporalDecayConfig
fn clone(&self) -> TemporalDecayConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TemporalDecayConfig
impl Debug for TemporalDecayConfig
Auto Trait Implementations§
impl Freeze for TemporalDecayConfig
impl RefUnwindSafe for TemporalDecayConfig
impl Send for TemporalDecayConfig
impl Sync for TemporalDecayConfig
impl Unpin for TemporalDecayConfig
impl UnsafeUnpin for TemporalDecayConfig
impl UnwindSafe for TemporalDecayConfig
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