PlasticityEngine

Trait PlasticityEngine 

Source
pub trait PlasticityEngine: Send + Sync {
    // Required methods
    fn process(
        &mut self,
        activation: &[f32],
        neuromod: &NeuromodState,
    ) -> Result<Vec<Delta>>;
    fn sync_neuromod(&mut self, neuromod: &NeuromodState);
    fn state(&self) -> PlasticityEngineState;
    fn restore(&mut self, state: &PlasticityEngineState) -> Result<()>;
}
Expand description

Trait for plasticity engines that generate deltas

Required Methods§

Source

fn process( &mut self, activation: &[f32], neuromod: &NeuromodState, ) -> Result<Vec<Delta>>

Process an activation vector and generate deltas

Takes:

  • activation: Input activation vector from meshes/mining
  • neuromod: Current neuromodulator state

Returns: Vector of deltas to apply to the Thermogram

Source

fn sync_neuromod(&mut self, neuromod: &NeuromodState)

Update internal state based on neuromodulation

Source

fn state(&self) -> PlasticityEngineState

Get current internal state for serialization

Source

fn restore(&mut self, state: &PlasticityEngineState) -> Result<()>

Restore from saved state

Implementors§