pub struct QuantumDecayPool {
pub patterns: Vec<PatternDecoherence>,
pub eviction_threshold: f64,
pub max_size: usize,
}Expand description
Quantum decay memory manager: tracks decoherence for a pool of patterns
Fields§
§patterns: Vec<PatternDecoherence>§eviction_threshold: f64Eviction threshold (patterns below this decoherence score are evicted)
max_size: usizeMaximum pool size (hard cap)
Implementations§
Source§impl QuantumDecayPool
impl QuantumDecayPool
pub fn new(max_size: usize) -> Self
Sourcepub fn on_retrieve(&mut self, id: u64)
pub fn on_retrieve(&mut self, id: u64)
Record retrieval — refreshes coherence.
Sourcepub fn weighted_score(&self, id: u64, base_score: f64) -> f64
pub fn weighted_score(&self, id: u64, base_score: f64) -> f64
Get decoherence-weighted score for search results.
Sourcepub fn evict_decoherent(&mut self) -> usize
pub fn evict_decoherent(&mut self) -> usize
Evict decoherent patterns, return count evicted.
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Sourcepub fn stats(&self) -> DecayPoolStats
pub fn stats(&self) -> DecayPoolStats
Statistics for monitoring
Auto Trait Implementations§
impl Freeze for QuantumDecayPool
impl RefUnwindSafe for QuantumDecayPool
impl Send for QuantumDecayPool
impl Sync for QuantumDecayPool
impl Unpin for QuantumDecayPool
impl UnsafeUnpin for QuantumDecayPool
impl UnwindSafe for QuantumDecayPool
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