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

Inheritance diagram for EvonetIterator:

Public Types

enum  layer_t { InputLayer, HiddenLayer, OutputLayer }
 enum the possible layers on which the blocks can be defined More...
 
- Public Types inherited from Resource
enum  ResourceChangeType
 

Public Member Functions

 EvonetIterator ()
 Constructor. More...
 
virtual ~EvonetIterator ()
 Destructor. More...
 
void defineBlock (QString name, layer_t layer, int startIndex, int size)
 Define a block. More...
 
EvonetgetEvonet ()
 Return the Evonet on which it will iterate on. More...
 
double getInput ()
 Get the input of the current neuron. More...
 
double getOutput ()
 Get the output of the current neuron. More...
 
bool nextNeuron ()
 Go to the next neuron of the current block. More...
 
bool setCurrentBlock (QString blockName)
 Set the current blocks of neurons to iterate. More...
 
void setEvonet (Evonet *evonet)
 Set the Evonet on which iterate. More...
 
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) More...
 
void setInput (double value)
 Set the input of the current neuron. More...
 
- Public Member Functions inherited from NeuronsIterator
virtual ~NeuronsIterator ()
 Destructor. More...
 

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 333 of file neuroninterfaces.h.

Constructor & Destructor Documentation

Constructor.

Definition at line 256 of file neuroninterfaces.cpp.

~EvonetIterator ( )
virtual

Destructor.

Definition at line 265 of file neuroninterfaces.cpp.

Member Function Documentation

void defineBlock ( QString  name,
layer_t  layer,
int  startIndex,
int  size 
)

Define a block.

Parameters
nameis the name to give to the block
layeris the layer on which the neurons lay
startIndexis the index of the neuron from which this block starts
sizeis the number of neurons for this block
Warning
it will overwrite any previous block definition with the same name

Definition at line 281 of file neuroninterfaces.cpp.

Evonet * getEvonet ( )

Return the Evonet on which it will iterate on.

Definition at line 277 of file neuroninterfaces.cpp.

double getInput ( )
virtual

Get the input of the current neuron.

Implements NeuronsIterator.

Definition at line 317 of file neuroninterfaces.cpp.

References Evonet::getInput().

double getOutput ( )
virtual

Get the output of the current neuron.

Implements NeuronsIterator.

Definition at line 323 of file neuroninterfaces.cpp.

References Evonet::getOutput().

bool nextNeuron ( )
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 301 of file neuroninterfaces.cpp.

bool setCurrentBlock ( QString  blockName)
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
blockNameis 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 289 of file neuroninterfaces.cpp.

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 269 of file neuroninterfaces.cpp.

void setGraphicProperties ( QString  label,
double  minValue,
double  maxValue,
QColor  color 
)
virtual

Set the graphic properties for the current neuron (in case it will be visualized on a GUI)

Parameters
labelis the name to show on the GUI corresponding to current neuron
minValueis the min value for the current neuron (for the GUI visualizing the activation value)
maxValueis the max value for the current neuron (for the GUI visualizing the activation value)
coloris the color on which the above data will be displayed on the GUIs

Implements NeuronsIterator.

Definition at line 329 of file neuroninterfaces.cpp.

References Evonet::getNoHiddens(), Evonet::getNoInputs(), Evonet::neurondcolor, Evonet::neuronrange, and Evonet::updateNeuronMonitor.

void setInput ( double  value)
virtual

Set the input of the current neuron.

Implements NeuronsIterator.

Definition at line 311 of file neuroninterfaces.cpp.

References Evonet::setInput().


The documentation for this class was generated from the following files: