FakeCluster Class. More...

Inheritance diagram for FakeCluster:

Public Member Functions

 FakeCluster (unsigned int size, QString name="unnamed")
 Construct a FakeCluster.
 
 FakeCluster (ConfigurationParameters &params, QString prefix)
 Construct from ConfigurationParameters.
 
virtual ~FakeCluster ()
 Destructor.
 
void randomize (double min, double max)
 Randomize ?!?! it do nothings.
 
virtual void save (ConfigurationParameters &params, QString prefix)
 Save the actual status of parameters into the ConfigurationParameters object passed.
 
void update ()
 Update ;-) It's do nothing !!
 
- Public Member Functions inherited from Cluster
 Cluster (unsigned int numNeurons, QString name="unnamed")
 Construct a Cluster.
 
 Cluster (ConfigurationParameters &params, QString prefix)
 Constructor.
 
virtual ~Cluster ()
 Destructor.
 
getStateVectorFuncPtr getDelegateFor (QString stateVector)
 Return the pointer to function for retrieving the DoubleVector representing the state requested.
 
double getInput (unsigned int neuron) const
 Get the input of neuron.
 
double getOutput (unsigned int neuron) const
 Get the output of neuron.
 
DoubleVectorinputs ()
 Get the array of inputs.
 
DoubleVector inputs () const
 Get the array of inputs.
 
bool isAccumulate () const
 return true if the Cluster will accumulates inputs
 
bool needReset ()
 Return true if inputs needs a reset.
 
unsigned int numNeurons () const
 Return the number of neurons (the length of input and output arrays)
 
OutputFunctionoutFunction () const
 Get the Output function.
 
DoubleVectoroutputs ()
 Get the array of outputs.
 
DoubleVector outputs () const
 Get the array of outputs.
 
void resetInputs ()
 Reset the inputs of this cluster; the inputs will be set to zero.
 
void setAccumulate (bool mode)
 Enable/Disable accumulation mode
If accumulation is enabled (true) then linkers attached to this Cluster will never resetInput and accumulates data, otherwise the inputs will be resetted at each step of neural network.
 
void setAllInputs (double value)
 Set all the inputs with the same value Details...
 
void setInput (unsigned int neuron, double value)
 Set the input of neuron Details...
 
void setInputs (const DoubleVector &inputs)
 Set the inputs from the vector given.
 
void setOutFunction (OutputFunction *up)
 Set the output function for all neurons contained
This method create an internal copy of the OutputFunction passed

 
void setOutput (unsigned int neuron, double value)
 Force the output of the neuron at value specified.
 
void setOutputs (const DoubleVector &outputs)
 Set the outputs from the vector given.
 
- Public Member Functions inherited from Updatable
 Updatable (QString name="unnamed")
 Constructor.
 
 Updatable (ConfigurationParameters &params, QString prefix)
 Constructor.
 
virtual ~Updatable ()
 Destructor.
 
QString name () const
 Return its name.
 
void setName (QString newname)
 Set the name of Updatable.
 
- Public Member Functions inherited from ParameterSettableInConstructor
 ParameterSettableInConstructor (ConfigurationParameters &, QString)
 
void addObserver (RuntimeParameterObserver *obs)
 
getRuntimeParameter (QString paramName)
 
virtual ParameterSettableUIgetUIManager ()
 
 ParameterSettable ()
 
virtual void postConfigureInitialization ()
 
void removeObserver (RuntimeParameterObserver *obs)
 
void setRuntimeParameter (QString paramName, T newvalue)
 
QString typeName () const
 
- Public Member Functions inherited from ParameterSettable
void addObserver (RuntimeParameterObserver *obs)
 
getRuntimeParameter (QString paramName)
 
void removeObserver (RuntimeParameterObserver *obs)
 
void setRuntimeParameter (QString paramName, T newvalue)
 
QString typeName () const
 

Static Public Member Functions

static void describe (QString type)
 Add to Factory::typeDescriptions() the descriptions of all parameters and subgroups.
 
- Static Public Member Functions inherited from Cluster
static void describe (QString type)
 Add to Factory::typeDescriptions() the descriptions of all parameters and subgroups.
 
- Static Public Member Functions inherited from Updatable
static void describe (QString type)
 Add to Factory::typeDescriptions() the descriptions of all parameters and subgroups.
 
- Static Public Member Functions inherited from ParameterSettableInConstructor
static void describe (QString type)
 
static QString fullParameterDescriptionPath (QString type, QString param)
 
static QString fullSubgroupDescriptionPath (QString type, QString sub)
 
- Static Public Member Functions inherited from ParameterSettable
static void describe (QString type)
 
static QString fullParameterDescriptionPath (QString type, QString param)
 
static QString fullSubgroupDescriptionPath (QString type, QString sub)
 

Additional Inherited Members

- Public Types inherited from Cluster
typedef DoubleVector &(* getStateVectorFuncPtr )(Cluster *)
 Delegate type for retrieving a vector by name (pointer to function) It works in this way:
 
- Public Attributes inherited from ParameterSettableInConstructor
 AllowMultiple
 
 Default
 
 IsList
 
 IsMandatory
 
- Static Public Attributes inherited from ParameterSettableInConstructor
static const double Infinity
 
static const int MaxInteger
 
static const int MinInteger
 
- Protected Member Functions inherited from Cluster
template<class T , DoubleVector &(T::*)() TMethod>
void setDelegateFor (QString vectorName)
 Configure a delegate for a specifing state vector; who implements subclasses of Cluster has to specify a name and the method used to retrieve any state vector that needs to be public (i.e.
 
void setNeedReset (bool b)
 Set the state of 'needReset'
Used by subclasses into update implementation.
 
- Static Protected Member Functions inherited from ParameterSettableInConstructor
static Descriptor addTypeDescription (QString type, QString shortHelp, QString longHelp=QString(""))
 
static void setGraphicalEditor (QString type)
 
- Protected Attributes inherited from Cluster
DoubleVectorinputdataptr
 Pointer to data Input.
 
DoubleVectoroutputdataptr
 Pointer to data Output.
 

Detailed Description

FakeCluster Class.

The FakeCluster is a Cluster without neurons, it's like an array ! :-)

Motivation
Description
The FakeCluster implemented the Cluster Interface so it can be inserted inside a BaseNeuralNet, but it doesn't contains neurons, but it contains a simple vector with values and inputs and outputs are alias name for this vector of data.
It's very useful for inputs layers that don't needs true neurons but only a vector where registry the sensors values.
Warnings
Due to fact that outputs() are simple an alias, or more precisly a VectorData view, of inputs(), this means that a call to resetInputs() method also resets the outputs!! In general, all methods that modify inputs also modify outputs and viceversa.

Definition at line 48 of file fakecluster.h.

Constructor & Destructor Documentation

FakeCluster ( unsigned int  size,
QString  name = "unnamed" 
)

Construct a FakeCluster.

Definition at line 25 of file fakecluster.cpp.

References Cluster::inputdataptr, and Cluster::outputdataptr.

FakeCluster ( ConfigurationParameters params,
QString  prefix 
)

Construct from ConfigurationParameters.

Definition at line 31 of file fakecluster.cpp.

References Cluster::inputdataptr, and Cluster::outputdataptr.

~FakeCluster ( )
virtual

Destructor.

Definition at line 38 of file fakecluster.cpp.

Member Function Documentation

void describe ( QString  type)
static

Add to Factory::typeDescriptions() the descriptions of all parameters and subgroups.

Definition at line 56 of file fakecluster.cpp.

References ParameterSettableInConstructor::addTypeDescription(), and Cluster::describe().

void randomize ( double  min,
double  max 
)
virtual

Randomize ?!?! it do nothings.

Implements Cluster.

Definition at line 46 of file fakecluster.cpp.

void save ( ConfigurationParameters params,
QString  prefix 
)
virtual

Save the actual status of parameters into the ConfigurationParameters object passed.

Parameters
paramsthe configuration parameters object on which save actual parameters
prefixthe prefix to use to access the object configuration parameters.

Reimplemented from Cluster.

Definition at line 50 of file fakecluster.cpp.

References Cluster::save(), and ConfigurationParameters::startObjectParameters().

void update ( )
virtual

Update ;-) It's do nothing !!

Implements Updatable.

Definition at line 41 of file fakecluster.cpp.

References Cluster::setNeedReset().


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