pub struct PatternDecoherence {
pub id: u64,
pub t1: Duration,
pub t2: Duration,
pub created_at: Instant,
pub last_retrieved: Instant,
pub phi: f64,
pub retrieval_count: u32,
}Expand description
Per-pattern decoherence state
Fields§
§id: u64Pattern id
t1: DurationT1 relaxation time (energy/existence decay)
t2: DurationT2 dephasing time (detail/coherence decay)
created_at: InstantInitial creation time
last_retrieved: InstantLast retrieval time (refreshes coherence)
phi: f64Φ value at creation — high Φ → longer coherence
retrieval_count: u32Retrieval count (higher count → refreshed T1)
Implementations§
Source§impl PatternDecoherence
impl PatternDecoherence
pub fn new(id: u64, phi: f64) -> Self
Sourcepub fn coherence_amplitude(&self) -> f64
pub fn coherence_amplitude(&self) -> f64
Current T2 coherence amplitude (1.0 = fully coherent, 0.0 = decoherent)
Sourcepub fn existence_probability(&self) -> f64
pub fn existence_probability(&self) -> f64
Current T1 existence probability (1.0 = exists, 0.0 = relaxed/forgotten)
Sourcepub fn decoherence_score(&self) -> f64
pub fn decoherence_score(&self) -> f64
Combined decoherence score for eviction decisions. Low score → candidate for eviction.
Sourcepub fn should_evict(&self, threshold: f64) -> bool
pub fn should_evict(&self, threshold: f64) -> bool
Should this pattern be evicted?
Trait Implementations§
Source§impl Clone for PatternDecoherence
impl Clone for PatternDecoherence
Source§fn clone(&self) -> PatternDecoherence
fn clone(&self) -> PatternDecoherence
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 moreAuto Trait Implementations§
impl Freeze for PatternDecoherence
impl RefUnwindSafe for PatternDecoherence
impl Send for PatternDecoherence
impl Sync for PatternDecoherence
impl Unpin for PatternDecoherence
impl UnsafeUnpin for PatternDecoherence
impl UnwindSafe for PatternDecoherence
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