pub struct StructuralPlasticity {
pub neurons: HashMap<u64, NeuronLike>,
pub dendritic_growth_rate: f32,
pub pruning_threshold: f32,
pub neurogenesis_events: u32,
}Fields§
§neurons: HashMap<u64, NeuronLike>§dendritic_growth_rate: f32§pruning_threshold: f32§neurogenesis_events: u32Implementations§
Source§impl StructuralPlasticity
impl StructuralPlasticity
pub fn new() -> Self
Sourcepub fn grow_dendrite(&mut self, neuron_id: u64, new_block: u32) -> bool
pub fn grow_dendrite(&mut self, neuron_id: u64, new_block: u32) -> bool
Grow dendrite: add new branches (dendritic growth)
Sourcepub fn mark_for_pruning(&mut self, neuron_id: u64, block_to_remove: u32)
pub fn mark_for_pruning(&mut self, neuron_id: u64, block_to_remove: u32)
Mark synapse for pruning (use it or lose it)
Sourcepub fn prune_inactive_branches(&mut self, neuron_id: u64) -> u32
pub fn prune_inactive_branches(&mut self, neuron_id: u64) -> u32
Prune inactive branches
Sourcepub fn neurogenesis(
&mut self,
seed_blocks: Vec<u32>,
specialization: &str,
) -> u64
pub fn neurogenesis( &mut self, seed_blocks: Vec<u32>, specialization: &str, ) -> u64
Neurogenesis: create new neuron-like structure
Sourcepub fn record_activation(&mut self, neuron_id: u64, strength: f32)
pub fn record_activation(&mut self, neuron_id: u64, strength: f32)
Record activation (for pruning decisions)
Sourcepub fn dendritic_complexity(&self, neuron_id: u64) -> f32
pub fn dendritic_complexity(&self, neuron_id: u64) -> f32
Calculate dendritic complexity
pub fn save(&self, dir: &Path) -> Result<(), String>
pub fn load(dir: &Path) -> Result<Self, String>
pub fn load_or_init(dir: &Path) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StructuralPlasticity
impl RefUnwindSafe for StructuralPlasticity
impl Send for StructuralPlasticity
impl Sync for StructuralPlasticity
impl Unpin for StructuralPlasticity
impl UnsafeUnpin for StructuralPlasticity
impl UnwindSafe for StructuralPlasticity
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