pub struct MemoryWave {
pub amplitude: f32,
pub frequency: f32,
pub phase: f32,
pub valence: f32,
pub arousal: f32,
pub created_at: Instant,
pub decay_tau: Option<Duration>,
}Expand description
Memory wave at a specific grid position
Fields§
§amplitude: f32Amplitude modulated by emotion and time
frequency: f32Wave frequency encoding semantic content (0-1000Hz)
phase: f32Phase encoding temporal relationships
valence: f32Emotional valence (-1.0 to 1.0)
arousal: f32Emotional arousal (0.0 to 1.0)
created_at: InstantCreation timestamp
decay_tau: Option<Duration>Decay time constant (None = infinite)
Implementations§
Source§impl MemoryWave
impl MemoryWave
Sourcepub fn new_with_band(
band: FrequencyBand,
amplitude: f32,
phase: f32,
decay_rate: f32,
) -> Self
pub fn new_with_band( band: FrequencyBand, amplitude: f32, phase: f32, decay_rate: f32, ) -> Self
Create a new memory wave with a specific frequency band
Sourcepub fn calculate(&self, t: f32) -> f32
pub fn calculate(&self, t: f32) -> f32
Calculate wave value at time t with decay and emotional modulation
Sourcepub fn calculate_decay(&self) -> f32
pub fn calculate_decay(&self) -> f32
Calculate temporal decay
Sourcepub fn calculate_emotional_modulation(&self) -> f32
pub fn calculate_emotional_modulation(&self) -> f32
Calculate emotional modulation based on valence and arousal
Sourcepub fn apply_context_decay(
&mut self,
relevance: f32,
familiarity: f32,
threat: f32,
)
pub fn apply_context_decay( &mut self, relevance: f32, familiarity: f32, threat: f32, )
Apply context-aware decay based on relevance, familiarity, and threat
Trait Implementations§
Source§impl Clone for MemoryWave
impl Clone for MemoryWave
Source§fn clone(&self) -> MemoryWave
fn clone(&self) -> MemoryWave
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 MemoryWave
impl Debug for MemoryWave
Source§impl<'de> Deserialize<'de> for MemoryWave
impl<'de> Deserialize<'de> for MemoryWave
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for MemoryWave
impl RefUnwindSafe for MemoryWave
impl Send for MemoryWave
impl Sync for MemoryWave
impl Unpin for MemoryWave
impl UnsafeUnpin for MemoryWave
impl UnwindSafe for MemoryWave
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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