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() -> TemporalDecayConfig
pub fn short_term() -> TemporalDecayConfig
Create config for short-term memory (fast decay)
Sourcepub fn long_term() -> TemporalDecayConfig
pub fn long_term() -> TemporalDecayConfig
Create config for long-term memory (slow decay)
Sourcepub fn working_memory() -> TemporalDecayConfig
pub fn working_memory() -> TemporalDecayConfig
Create config for working memory (very fast decay)
Sourcepub fn with_half_life(
half_life_secs: f64,
semantic_weight: f32,
) -> TemporalDecayConfig
pub fn with_half_life( half_life_secs: f64, semantic_weight: f32, ) -> TemporalDecayConfig
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 (const: unstable) · 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
Source§impl Default for TemporalDecayConfig
impl Default for TemporalDecayConfig
Source§fn default() -> TemporalDecayConfig
fn default() -> TemporalDecayConfig
Returns the “default value” for a type. Read more
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§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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