pub struct BalancedRecallFold { /* private fields */ }Expand description
Fold for the BalancedRecallProfile state (ADR-032 §5a).
The predecessor design had this fold update a flat HashMap<String, BetaPosterior>
on the brain’s core BrainState. Per ADR-032, the three-scalar Bayesian state
now lives entirely inside BalancedRecallProfile — brain’s BrainState holds
profile registry metadata; posteriors are opaque to brain.
Deterministic: same events in same order → same BalancedRecallState.
Implementations§
Trait Implementations§
Source§impl Fold<Event, BalancedRecallState> for BalancedRecallFold
impl Fold<Event, BalancedRecallState> for BalancedRecallFold
Source§fn init(&self, _context: &FoldContext) -> BalancedRecallState
fn init(&self, _context: &FoldContext) -> BalancedRecallState
Get the initial state before any entries are processed.
Source§fn reduce(
&self,
state: BalancedRecallState,
event: &Event,
_ctx: &FoldContext,
) -> BalancedRecallState
fn reduce( &self, state: BalancedRecallState, event: &Event, _ctx: &FoldContext, ) -> BalancedRecallState
Process a single entry and return the new state.
Source§fn finalize(
&self,
state: BalancedRecallState,
_context: &FoldContext,
) -> BalancedRecallState
fn finalize( &self, state: BalancedRecallState, _context: &FoldContext, ) -> BalancedRecallState
Finalize the state after all entries are processed. Read more
Source§fn derive<'a, I>(&self, entries: I, context: &FoldContext) -> FoldOutcome<S>
fn derive<'a, I>(&self, entries: I, context: &FoldContext) -> FoldOutcome<S>
Derive state from an iterator of entries. Read more
Source§fn derive_filtered<'a, I, F>(
&self,
entries: I,
context: &FoldContext,
filter: F,
) -> FoldOutcome<S>
fn derive_filtered<'a, I, F>( &self, entries: I, context: &FoldContext, filter: F, ) -> FoldOutcome<S>
Derive state with a filter.
Auto Trait Implementations§
impl Freeze for BalancedRecallFold
impl RefUnwindSafe for BalancedRecallFold
impl Send for BalancedRecallFold
impl Sync for BalancedRecallFold
impl Unpin for BalancedRecallFold
impl UnsafeUnpin for BalancedRecallFold
impl UnwindSafe for BalancedRecallFold
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