pub struct EpisodeStore {
pub episodes: Vec<EmotionalEpisode>,
pub next_id: u64,
}Expand description
Stores emotional episodes with EEP1 binary persistence.
Fields§
§episodes: Vec<EmotionalEpisode>§next_id: u64Implementations§
Source§impl EpisodeStore
impl EpisodeStore
pub fn new() -> Self
Sourcepub fn load_or_init(output_dir: &Path) -> Self
pub fn load_or_init(output_dir: &Path) -> Self
Load from disk or initialize empty.
Sourcepub fn add(&mut self, episode: EmotionalEpisode) -> u64
pub fn add(&mut self, episode: EmotionalEpisode) -> u64
Add a new episode. Returns the episode ID.
Sourcepub fn active_episodes(&self) -> Vec<&EmotionalEpisode>
pub fn active_episodes(&self) -> Vec<&EmotionalEpisode>
Get all active (non-decayed) episodes.
Sourcepub fn aggregate_21d(&self) -> [f32; 21]
pub fn aggregate_21d(&self) -> [f32; 21]
Aggregate the 21D state from all active episodes. Each episode contributes its decayed 21D vector, weighted by intensity and gate pass status (failed episodes contribute less).
Sourcepub fn aggregate_pad(&self) -> PadState
pub fn aggregate_pad(&self) -> PadState
Aggregate PAD state from active episodes.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EpisodeStore
impl RefUnwindSafe for EpisodeStore
impl Send for EpisodeStore
impl Sync for EpisodeStore
impl Unpin for EpisodeStore
impl UnsafeUnpin for EpisodeStore
impl UnwindSafe for EpisodeStore
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
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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