pub struct MemoryNeuronArray { /* private fields */ }Expand description
High-performance Structure of Arrays for memory neurons
Implementations§
Source§impl MemoryNeuronArray
impl MemoryNeuronArray
Sourcepub fn create_memory_neuron(
&mut self,
pattern_hash: u64,
cortical_area_id: u32,
current_burst: u64,
config: &MemoryNeuronLifecycleConfig,
) -> Option<usize>
pub fn create_memory_neuron( &mut self, pattern_hash: u64, cortical_area_id: u32, current_burst: u64, config: &MemoryNeuronLifecycleConfig, ) -> Option<usize>
Create a new memory neuron
Sourcepub fn reactivate_memory_neuron(
&mut self,
neuron_idx: usize,
current_burst: u64,
) -> bool
pub fn reactivate_memory_neuron( &mut self, neuron_idx: usize, current_burst: u64, ) -> bool
Reactivate an existing memory neuron
Sourcepub fn age_memory_neurons(&mut self, _current_burst: u64) -> Vec<usize>
pub fn age_memory_neurons(&mut self, _current_burst: u64) -> Vec<usize>
Age all active memory neurons (vectorized operation)
Sourcepub fn check_longterm_conversion(
&mut self,
longterm_threshold: u32,
) -> Vec<usize>
pub fn check_longterm_conversion( &mut self, longterm_threshold: u32, ) -> Vec<usize>
Check for neurons ready for long-term memory conversion
Sourcepub fn check_longterm_conversion_by_area(
&mut self,
lifecycle_configs: &HashMap<u32, MemoryNeuronLifecycleConfig>,
default_threshold: u32,
) -> Vec<usize>
pub fn check_longterm_conversion_by_area( &mut self, lifecycle_configs: &HashMap<u32, MemoryNeuronLifecycleConfig>, default_threshold: u32, ) -> Vec<usize>
Check for neurons ready for long-term conversion using per-area thresholds.
Areas without an explicit lifecycle config use default_threshold.
Sourcepub fn get_active_neurons_by_area(&self, cortical_area_id: u32) -> Vec<u32>
pub fn get_active_neurons_by_area(&self, cortical_area_id: u32) -> Vec<u32>
Get all active neuron IDs for a cortical area
Sourcepub fn find_neuron_by_pattern(&self, pattern_hash: &u64) -> Option<usize>
pub fn find_neuron_by_pattern(&self, pattern_hash: &u64) -> Option<usize>
Find neuron index by pattern hash
Sourcepub fn get_neuron_id(&self, neuron_idx: usize) -> Option<u32>
pub fn get_neuron_id(&self, neuron_idx: usize) -> Option<u32>
Get neuron ID at index
Sourcepub fn get_cortical_area_id(&self, neuron_idx: usize) -> Option<u32>
pub fn get_cortical_area_id(&self, neuron_idx: usize) -> Option<u32>
Get cortical area ID at index
pub fn get_pattern_hash(&self, neuron_idx: usize) -> Option<u64>
Sourcepub fn get_stats(&self) -> MemoryNeuronStats
pub fn get_stats(&self) -> MemoryNeuronStats
Get comprehensive statistics
Sourcepub fn get_id_allocation_stats(&self) -> AllocationStats
pub fn get_id_allocation_stats(&self) -> AllocationStats
Get ID manager allocation statistics
Auto Trait Implementations§
impl Freeze for MemoryNeuronArray
impl RefUnwindSafe for MemoryNeuronArray
impl Send for MemoryNeuronArray
impl Sync for MemoryNeuronArray
impl Unpin for MemoryNeuronArray
impl UnsafeUnpin for MemoryNeuronArray
impl UnwindSafe for MemoryNeuronArray
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> 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