Class: RubyBrain::Nodes::ConstNode
- Inherits:
-
Object
- Object
- RubyBrain::Nodes::ConstNode
- Defined in:
- lib/ruby_brain/nodes.rb
Instance Attribute Summary collapse
-
#left_side_weights ⇒ Object
Returns the value of attribute left_side_weights.
-
#order_index ⇒ Object
Returns the value of attribute order_index.
-
#right_side_weights ⇒ Object
Returns the value of attribute right_side_weights.
-
#this_backward_output ⇒ Object
readonly
Returns the value of attribute this_backward_output.
-
#this_output ⇒ Object
readonly
Returns the value of attribute this_output.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(value = 1.0) ⇒ ConstNode
constructor
A new instance of ConstNode.
- #output_of_backward_calc(backward_inputs = []) ⇒ Object
- #output_of_forward_calc(inputs = []) ⇒ Object
Constructor Details
#initialize(value = 1.0) ⇒ ConstNode
Returns a new instance of ConstNode.
45 46 47 48 |
# File 'lib/ruby_brain/nodes.rb', line 45 def initialize(value=1.0) @value = value @this_output = nil end |
Instance Attribute Details
#left_side_weights ⇒ Object
Returns the value of attribute left_side_weights.
42 43 44 |
# File 'lib/ruby_brain/nodes.rb', line 42 def left_side_weights @left_side_weights end |
#order_index ⇒ Object
Returns the value of attribute order_index.
42 43 44 |
# File 'lib/ruby_brain/nodes.rb', line 42 def order_index @order_index end |
#right_side_weights ⇒ Object
Returns the value of attribute right_side_weights.
42 43 44 |
# File 'lib/ruby_brain/nodes.rb', line 42 def right_side_weights @right_side_weights end |
#this_backward_output ⇒ Object (readonly)
Returns the value of attribute this_backward_output.
43 44 45 |
# File 'lib/ruby_brain/nodes.rb', line 43 def this_backward_output @this_backward_output end |
#this_output ⇒ Object (readonly)
Returns the value of attribute this_output.
43 44 45 |
# File 'lib/ruby_brain/nodes.rb', line 43 def this_output @this_output end |
#value ⇒ Object
Returns the value of attribute value.
42 43 44 |
# File 'lib/ruby_brain/nodes.rb', line 42 def value @value end |
Instance Method Details
#output_of_backward_calc(backward_inputs = []) ⇒ Object
54 55 56 |
# File 'lib/ruby_brain/nodes.rb', line 54 def output_of_backward_calc(backward_inputs=[]) nil end |
#output_of_forward_calc(inputs = []) ⇒ Object
50 51 52 |
# File 'lib/ruby_brain/nodes.rb', line 50 def output_of_forward_calc(inputs=[]) @this_output = @value end |