pub struct MirrorState {
pub echoes: Vec<ResonanceEcho>,
pub block_resonance: HashMap<u32, BlockResonance>,
}Expand description
Mirror neuron state — loaded from resonance.bin.
Fields§
§echoes: Vec<ResonanceEcho>§block_resonance: HashMap<u32, BlockResonance>Implementations§
Source§impl MirrorState
impl MirrorState
Sourcepub fn load_or_init(output_dir: &Path) -> Self
pub fn load_or_init(output_dir: &Path) -> Self
Load or initialize mirror state.
Sourcepub fn detect_resonance(
&mut self,
new_activations: &[(u32, f32)],
new_hash: u64,
fingerprints: &[ActivationFingerprint],
) -> HashMap<u32, f32>
pub fn detect_resonance( &mut self, new_activations: &[(u32, f32)], new_hash: u64, fingerprints: &[ActivationFingerprint], ) -> HashMap<u32, f32>
Detect resonance between a new activation and all stored fingerprints. Returns the resonance boost per block (block_idx → boost_score).
Sourcepub fn stats(&self) -> MirrorStats
pub fn stats(&self) -> MirrorStats
Get statistics.
Sourcepub fn most_resonant(&self, n: usize) -> Vec<(u32, &BlockResonance)>
pub fn most_resonant(&self, n: usize) -> Vec<(u32, &BlockResonance)>
Get top-N most resonant blocks.
Auto Trait Implementations§
impl Freeze for MirrorState
impl RefUnwindSafe for MirrorState
impl Send for MirrorState
impl Sync for MirrorState
impl Unpin for MirrorState
impl UnsafeUnpin for MirrorState
impl UnwindSafe for MirrorState
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> 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