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§
Sourcefn process(
&mut self,
activation: &[f32],
neuromod: &NeuromodState,
) -> Result<Vec<Delta>>
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/miningneuromod: Current neuromodulator state
Returns: Vector of deltas to apply to the Thermogram
Sourcefn sync_neuromod(&mut self, neuromod: &NeuromodState)
fn sync_neuromod(&mut self, neuromod: &NeuromodState)
Update internal state based on neuromodulation
Sourcefn state(&self) -> PlasticityEngineState
fn state(&self) -> PlasticityEngineState
Get current internal state for serialization
Sourcefn restore(&mut self, state: &PlasticityEngineState) -> Result<()>
fn restore(&mut self, state: &PlasticityEngineState) -> Result<()>
Restore from saved state