Class: NEAT::BasicNeuronTypes::InputNeuron
- Defined in:
- lib/rubyneat/neuron.rb
Overview
Special class of Neuron that takes input from the “real world”
Name of this neuron equates to the parameter name of the input.
All inputs are handled with this neuron. This type of neuron only has one input – from the outside world.
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Neuron
#genotype, #heirarchy_number, #output, #trait
Attributes inherited from NeatOb
Class Method Summary collapse
Instance Method Summary collapse
-
#express(instance) ⇒ Object
Takes a single input and passes it as is.
Methods inherited from Neuron
bias?, #bias?, inherited, #input?, neuron_types, #output?, type_name
Methods included from Graph
#<<, #add, #clear_graph, #inputs
Methods inherited from NeatOb
attr_neat, #initialize, log, #log, #to_s
Constructor Details
This class inherits a constructor from NEAT::NeatOb
Class Method Details
.input? ⇒ Boolean
81 |
# File 'lib/rubyneat/neuron.rb', line 81 def self.input? ; true ; end |
Instance Method Details
#express(instance) ⇒ Object
Takes a single input and passes it as is.
84 85 86 87 88 |
# File 'lib/rubyneat/neuron.rb', line 84 def express(instance) instance.define_singleton_method(@name) {|input| input } end |