Class: Neuronet::Connection

Inherits:
Struct
  • Object
show all
Defined in:
lib/neuronet/connection.rb

Overview

Connection is a lightweight struct for weighted neuron links.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#neuronObject

Returns the value of attribute neuron

Returns:

  • (Object)

    the current value of neuron



5
6
7
# File 'lib/neuronet/connection.rb', line 5

def neuron
  @neuron
end

#weightObject

Returns the value of attribute weight

Returns:

  • (Object)

    the current value of weight



5
6
7
# File 'lib/neuronet/connection.rb', line 5

def weight
  @weight
end

Instance Method Details

#valueObject

Weighted activation value



7
# File 'lib/neuronet/connection.rb', line 7

def value = neuron.activation * weight