pub struct AutoNCP { /* private fields */ }Expand description
AutoNCP provides an easier way to create NCP wiring
Implementations§
Trait Implementations§
Source§impl Wiring for AutoNCP
impl Wiring for AutoNCP
Source§fn output_dim(&self) -> Option<usize>
fn output_dim(&self) -> Option<usize>
Returns the output dimension (number of motor neurons)
Source§fn num_layers(&self) -> usize
fn num_layers(&self) -> usize
Returns the number of layers in this wiring
Source§fn get_neurons_of_layer(&self, layer_id: usize) -> Vec<usize>
fn get_neurons_of_layer(&self, layer_id: usize) -> Vec<usize>
Returns the neuron IDs for a specific layer
Source§fn get_type_of_neuron(&self, neuron_id: usize) -> &'static str
fn get_type_of_neuron(&self, neuron_id: usize) -> &'static str
Get type of a neuron (motor, inter, command, etc.)
Source§fn adjacency_matrix(&self) -> &Array2<i32>
fn adjacency_matrix(&self) -> &Array2<i32>
Returns the adjacency matrix representing synapses between neurons
Source§fn sensory_adjacency_matrix(&self) -> Option<&Array2<i32>>
fn sensory_adjacency_matrix(&self) -> Option<&Array2<i32>>
Returns the sensory adjacency matrix (synapses from inputs to neurons)
Source§fn add_synapse(&mut self, src: usize, dest: usize, polarity: i32)
fn add_synapse(&mut self, src: usize, dest: usize, polarity: i32)
Add a synapse between neurons
Source§fn add_sensory_synapse(&mut self, src: usize, dest: usize, polarity: i32)
fn add_sensory_synapse(&mut self, src: usize, dest: usize, polarity: i32)
Add a sensory synapse from input feature to neuron
Source§fn get_config(&self) -> WiringConfig
fn get_config(&self) -> WiringConfig
Create a serialization config for this wiring
Source§fn erev_initializer(&self) -> Array2<i32>
fn erev_initializer(&self) -> Array2<i32>
Initialize the adjacency matrix (erev)
Source§fn sensory_erev_initializer(&self) -> Option<Array2<i32>>
fn sensory_erev_initializer(&self) -> Option<Array2<i32>>
Initialize the sensory adjacency matrix (erev)
Source§fn synapse_count(&self) -> usize
fn synapse_count(&self) -> usize
Count total internal synapses
Source§fn sensory_synapse_count(&self) -> usize
fn sensory_synapse_count(&self) -> usize
Count total sensory synapses
fn input_required(&self) -> bool
Auto Trait Implementations§
impl Freeze for AutoNCP
impl RefUnwindSafe for AutoNCP
impl Send for AutoNCP
impl Sync for AutoNCP
impl Unpin for AutoNCP
impl UnwindSafe for AutoNCP
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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