pub struct FullyConnected { /* private fields */ }Expand description
Fully connected wiring structure
Implementations§
Source§impl FullyConnected
impl FullyConnected
pub fn new( units: usize, output_dim: Option<usize>, erev_init_seed: u64, self_connections: bool, ) -> Self
Sourcepub fn get_full_config(&self) -> WiringConfig
pub fn get_full_config(&self) -> WiringConfig
Get configuration for serialization
pub fn from_config(config: WiringConfig) -> Self
Trait Implementations§
Source§impl Clone for FullyConnected
impl Clone for FullyConnected
Source§fn clone(&self) -> FullyConnected
fn clone(&self) -> FullyConnected
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FullyConnected
impl Debug for FullyConnected
Source§impl Wiring for FullyConnected
impl Wiring for FullyConnected
Source§fn output_dim(&self) -> Option<usize>
fn output_dim(&self) -> Option<usize>
Returns the output dimension (number of motor neurons)
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 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 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 FullyConnected
impl RefUnwindSafe for FullyConnected
impl Send for FullyConnected
impl Sync for FullyConnected
impl Unpin for FullyConnected
impl UnwindSafe for FullyConnected
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