Class: Synapse
- Inherits:
-
NeuralEntity
- Object
- NeuralEntity
- Synapse
- Defined in:
- lib/Yinspire/Core/Synapse.rb,
lib/Yinspire.rb
Overview
Base class of all Synapses. Defines the structure that is special for a Synapse, i.e. that a Synapse has a pre and a post-Neuron. Also each Synapse has a weight
and a delay
.
Direct Known Subclasses
Instance Method Summary collapse
-
#connect(target) ⇒ Object
Adding a pre synapse.
- #disconnect(target) ⇒ Object
- #each_connection {|self.post_neuron| ... } ⇒ Object
Methods inherited from NeuralEntity
class_from_name, #disconnect_all, #dump, entity_ann_dump_cache, entity_ann_load_cache, #entity_type, entity_type_map, entity_type_map_reverse, #initialize, #load, new_from_name
Constructor Details
This class inherits a constructor from NeuralEntity
Instance Method Details
#connect(target) ⇒ Object
Adding a pre synapse. Target must be a Neuron.
38 39 40 |
# File 'lib/Yinspire/Core/Synapse.rb', line 38 def connect(target) target.add_pre_synapse(self) end |
#disconnect(target) ⇒ Object
42 43 44 |
# File 'lib/Yinspire/Core/Synapse.rb', line 42 def disconnect(target) target.delete_pre_synapse(self) end |
#each_connection {|self.post_neuron| ... } ⇒ Object
46 47 48 |
# File 'lib/Yinspire/Core/Synapse.rb', line 46 def each_connection yield self.post_neuron end |