cluster.cpp
57 QString vectorSizeErrorTmpl( "The number of elements of the %1 vector in configuration file (%1) is different from the number of neurons (%2)");
154 d.describeInt( "numNeurons" ).limits( 1, INT_MAX ).props( IsMandatory ).help( "The number of neurons contained by the Cluster" );
155 d.describeBool( "accumulate" ).def( false ).help( "If true new inputs will be added to the previous values" );
158 d.describeSubgroup( "OutFunction" ).type( "OutputFunction" ).help( "The output function used to calculate the output values" );
static QVector< double > getVector(ConfigurationParameters ¶ms, QString paramPath, QString def=QString())
Library of Common OutputFunction.
void setInputs(const DoubleVector &inputs)
Set the inputs from the vector given.
Definition: cluster.cpp:99
void resetInputs()
Reset the inputs of this cluster; the inputs will be set to zero.
Definition: cluster.cpp:108
virtual void save(ConfigurationParameters ¶ms, QString prefix)
Save the actual status of parameters into the ConfigurationParameters object passed.
Definition: updatable.cpp:56
void setOutFunction(OutputFunction *up)
Set the output function for all neurons contained This method create an internal copy of the OutputF...
Definition: cluster.cpp:90
void setOutputs(const DoubleVector &outputs)
Set the outputs from the vector given.
Definition: cluster.cpp:121
void setAllInputs(double value)
Set all the inputs with the same value Details...
Definition: cluster.cpp:103
static bool getBool(ConfigurationParameters ¶ms, QString paramPath, bool def=false)
void setInput(unsigned int neuron, double value)
Set the input of neuron Details...
Definition: cluster.cpp:95
void setOutput(unsigned int neuron, double value)
Force the output of the neuron at value specified.
Definition: cluster.cpp:117
bool isAccumulate() const
return true if the Cluster will accumulates inputs
Definition: cluster.h:97
virtual void save(ConfigurationParameters ¶ms, QString prefix)
Save the actual status of parameters into the ConfigurationParameters object passed.
Definition: cluster.cpp:129
bool startObjectParameters(QString groupPath, QString typeName, ParameterSettable *object)
static void describe(QString type)
Add to Factory::typeDescriptions() the descriptions of all parameters and subgroups.
Definition: cluster.cpp:151
QString createSubGroup(QString parentPath, QString groupName)
static Descriptor addTypeDescription(QString type, QString shortHelp, QString longHelp=QString(""))
TypeToCreate * getObjectFromGroup(QString group, bool configure=true, bool forceObjectCreation=false)
This file contains the declarations of the Cluster class.
static void describe(QString type)
Add to Factory::typeDescriptions() the descriptions of all parameters and subgroups.
Definition: updatable.cpp:61
unsigned int numNeurons() const
Return the number of neurons (the length of input and output arrays)
Definition: cluster.h:82
void setNeedReset(bool b)
Set the state of 'needReset' Used by subclasses into update implementation.
Definition: cluster.h:210
void createParameter(QString groupPath, QString parameter)
IsMandatory
static bool hasGroup(ConfigurationParameters ¶ms, QString group)
Cluster(unsigned int numNeurons, QString name="unnamed")
Construct a Cluster.
Definition: cluster.cpp:29