Class: Phren::Neuron
- Inherits:
-
Object
- Object
- Phren::Neuron
- Defined in:
- lib/neuron.rb
Instance Attribute Summary collapse
-
#error_signal ⇒ Object
Returns the value of attribute error_signal.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(value, id) ⇒ Neuron
constructor
A new instance of Neuron.
Constructor Details
#initialize(value, id) ⇒ Neuron
Returns a new instance of Neuron.
9 10 11 12 13 |
# File 'lib/neuron.rb', line 9 def initialize(value, id) @value = value @id = id @error_signal = 0 end |
Instance Attribute Details
#error_signal ⇒ Object
Returns the value of attribute error_signal.
5 6 7 |
# File 'lib/neuron.rb', line 5 def error_signal @error_signal end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/neuron.rb', line 6 def id @id end |
#value ⇒ Object
Returns the value of attribute value.
5 6 7 |
# File 'lib/neuron.rb', line 5 def value @value end |