This class iterate over the neurons of a Evonet neural network. More...

Public Types | |
enum | layer_t { InputLayer, HiddenLayer, OutputLayer } |
enum the possible layers on which the blocks can be defined More... | |
Public Member Functions | |
EvonetIterator () | |
Constructor. | |
virtual | ~EvonetIterator () |
Destructor. | |
void | defineBlock (QString name, layer_t layer, int startIndex, int size) |
Define a block. | |
double | getOutput () |
Get the output of the current neuron. | |
bool | nextNeuron () |
Go to the next neuron of the current block. | |
bool | setCurrentBlock (QString blockName) |
Set the current blocks of neurons to iterate. | |
void | setEvonet (Evonet *evonet) |
Set the Evonet on which iterate. | |
void | setGraphicProperties (QString label, double minValue, double maxValue, QColor color) |
Set the graphic properties for the current neuron (in case it will be visualized on a GUI) | |
void | setInput (double value) |
Set the input of the current neuron. | |
![]() | |
virtual | ~NeuronsIterator () |
Destructor. | |
Detailed Description
This class iterate over the neurons of a Evonet neural network.
The blocks are identified by specifing the start and the end indexes and to which layer are related to.
Definition at line 205 of file neuroninterfaces.h.
Member Enumeration Documentation
enum layer_t |
enum the possible layers on which the blocks can be defined
Definition at line 216 of file neuroninterfaces.h.
Constructor & Destructor Documentation
EvonetIterator | ( | ) |
Constructor.
Definition at line 134 of file neuroninterfaces.cpp.
|
virtual |
Destructor.
Definition at line 143 of file neuroninterfaces.cpp.
Member Function Documentation
void defineBlock | ( | QString | name, |
layer_t | layer, | ||
int | startIndex, | ||
int | size | ||
) |
Define a block.
- Parameters
-
name is the name to give to the block layer is the layer on which the neurons lay startIndex is the index of the neuron from which this block starts size is the number of neurons for this block
- Warning
- it will overwrite any previous block definition with the same name
Definition at line 155 of file neuroninterfaces.cpp.
|
virtual |
Get the output of the current neuron.
Implements NeuronsIterator.
Definition at line 192 of file neuroninterfaces.cpp.
|
virtual |
Go to the next neuron of the current block.
- Returns
- true if a next neuron exist and set it as current neuron; false when it has been reached the end of current block
- Note
- if you need to go back at the beginning, use setCurrentBlock again
Implements NeuronsIterator.
Definition at line 176 of file neuroninterfaces.cpp.
Referenced by iCubFingertipsTouchSensor::update(), iCubPalmPatchesTouchSensor::update(), and HandObjectVisualOffsetSensor::update().
|
virtual |
Set the current blocks of neurons to iterate.
You need to first call this method for iterate over neurons. This method will initialize the internal counters for iterate over neurons.
- Note
- it's mandatory to configure the available blocks using the method defineBlock
- Parameters
-
blockName is the name given to the block
- Returns
- true if the current block is now the block defined with name blockName; false otherwise
Implements NeuronsIterator.
Definition at line 163 of file neuroninterfaces.cpp.
References Logger::error().
Referenced by iCubFingertipsTouchSensor::update(), iCubPalmPatchesTouchSensor::update(), and HandObjectVisualOffsetSensor::update().
void setEvonet | ( | Evonet * | evonet | ) |
Set the Evonet on which iterate.
- Warning
- when you set an Evonet all previous definition of blocks will be erased
Definition at line 147 of file neuroninterfaces.cpp.
|
virtual |
Set the graphic properties for the current neuron (in case it will be visualized on a GUI)
- Parameters
-
label is the name to show on the GUI corresponding to current neuron minValue is the min value for the current neuron (for the GUI visualizing the activation value) maxValue is the max value for the current neuron (for the GUI visualizing the activation value) color is the color on which the above data will be displayed on the GUIs
Implements NeuronsIterator.
Definition at line 198 of file neuroninterfaces.cpp.
|
virtual |
Set the input of the current neuron.
Implements NeuronsIterator.
Definition at line 186 of file neuroninterfaces.cpp.
Referenced by iCubFingertipsTouchSensor::update(), iCubPalmPatchesTouchSensor::update(), and HandObjectVisualOffsetSensor::update().
The documentation for this class was generated from the following files:
- experiments/include/neuroninterfaces.h
- experiments/src/neuroninterfaces.cpp