pub struct EventDrivenOptimizer<T: Float + Debug + Send + Sync + 'static> { /* private fields */ }Expand description
Event-driven optimizer
Implementations§
Source§impl<T: Float + Debug + Send + Sync + 'static + Sum + ScalarOperand + AddAssign> EventDrivenOptimizer<T>
impl<T: Float + Debug + Send + Sync + 'static + Sum + ScalarOperand + AddAssign> EventDrivenOptimizer<T>
Sourcepub fn new(
config: EventDrivenConfig<T>,
stdp_config: STDPConfig<T>,
membrane_config: MembraneDynamicsConfig<T>,
num_neurons: usize,
) -> Self
pub fn new( config: EventDrivenConfig<T>, stdp_config: STDPConfig<T>, membrane_config: MembraneDynamicsConfig<T>, num_neurons: usize, ) -> Self
Create a new event-driven optimizer
Sourcepub fn enqueue_event(&mut self, event: NeuromorphicEvent<T>) -> Result<()>
pub fn enqueue_event(&mut self, event: NeuromorphicEvent<T>) -> Result<()>
Add event to the processing queue
Sourcepub fn process_events(&mut self) -> Result<usize>
pub fn process_events(&mut self) -> Result<usize>
Process events from the queue
Sourcepub fn get_event_statistics(&self) -> &HashMap<EventType, EventStatistics<T>>
pub fn get_event_statistics(&self) -> &HashMap<EventType, EventStatistics<T>>
Get event processing statistics
Sourcepub fn get_system_state(&self) -> &SystemState<T>
pub fn get_system_state(&self) -> &SystemState<T>
Get current system state
Sourcepub fn get_metrics(&self) -> &NeuromorphicMetrics<T>
pub fn get_metrics(&self) -> &NeuromorphicMetrics<T>
Get current metrics
Sourcepub fn clear_event_queue(&mut self)
pub fn clear_event_queue(&mut self)
Clear event queue
Sourcepub fn get_queue_size(&self) -> usize
pub fn get_queue_size(&self) -> usize
Get queue size
Sourcepub fn enable_distributed_processing(&mut self, num_workers: usize)
pub fn enable_distributed_processing(&mut self, num_workers: usize)
Enable distributed processing
Sourcepub fn disable_distributed_processing(&mut self)
pub fn disable_distributed_processing(&mut self)
Disable distributed processing
Auto Trait Implementations§
impl<T> Freeze for EventDrivenOptimizer<T>where
T: Freeze,
impl<T> !RefUnwindSafe for EventDrivenOptimizer<T>
impl<T> Send for EventDrivenOptimizer<T>
impl<T> Sync for EventDrivenOptimizer<T>
impl<T> Unpin for EventDrivenOptimizer<T>where
T: Unpin,
impl<T> UnsafeUnpin for EventDrivenOptimizer<T>where
T: UnsafeUnpin,
impl<T> !UnwindSafe for EventDrivenOptimizer<T>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.