CopyLinker Class Reference

CopyLinker Class. More...

Inheritance diagram for CopyLinker:

Public Member Functions

 CopyLinker (Cluster *from, Cluster *to, QString name="unnamed")
 Constructor.
 
 CopyLinker (ConfigurationParameters &params, QString prefix)
 Constructor.
 
virtual ~CopyLinker ()
 Destructor.
 
void randomize (double, double)
 Randomize (i.e.
 
virtual void save (ConfigurationParameters &params, QString prefix)
 Save the actual status of parameters into the ConfigurationParameters object passed.
 
unsigned int size () const
 Returns the number of neurons connected.
 
void update ()
 Update the linker.
 
- Public Member Functions inherited from Linker
 Linker (Cluster *from, Cluster *to, QString name="unnamed")
 Construct.
 
 Linker (ConfigurationParameters &params, QString prefix)
 Constructor.
 
void configureFromVector (QString vectorName)
 Configure on which state vector of 'from' Cluster this Linker is attached to.
 
void configureToVector (QString vectorName)
 Configure on which state vector of 'to' Cluster this Linker is attached to.
 
Clusterfrom () const
 Return the Cluster From.
 
Clusterto () const
 Return the Cluster to.
 
- 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
 

Additional Inherited Members

- Public Types inherited from ParameterSettableInConstructor
enum  Property
 
- Static Public Member Functions inherited from Linker
static void describe (QString type)
 Add to Factory::typeDescriptions() the descriptions of all parameters and subgroups.
 
- 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 Linker
DoubleVectorfromVector () const
 Return a reference to the DoubleVector of 'from' on which this is attached to.
 
DoubleVectortoVector () const
 Return a reference to the DoubleVector of 'to' on which this is attached to.
 
- Static Protected Member Functions inherited from ParameterSettableInConstructor
static Descriptor addTypeDescription (QString type, QString shortHelp, QString longHelp=QString(""))
 
static void setGraphicalEditor (QString type)
 

Detailed Description

CopyLinker Class.

This linker copies the outputs of a cluster to inputs of another cluster

Motivation
The CopyLinker is useful in networks when one requires that data be transferred from one Cluster's terminal to another without computation. For example, in Elmann networks the values of hidden layer inputs are copied to the context layer Cluster (which acts like a short-term memory of former inputs).
Description
The CopyLinker is an object that 'literally' copies the outputs from one Cluster to another. Use the fromVector and toVector for specifying the source and target vector for the Cluster
Warnings
If there is a mis-match in the dimensionality of the terminals connected by the CopyLinker, as much data as possible is copied. For example; a CopyLinker between a 'from' and 'to' Cluster with 8 and 5 inputs respectively, will copy the first 5 data elements for 'from' into the inputs for 'to'. Vice versa, if the dimensions of 'from' and 'to' are 5 and 8 respectively, then the 5 inputs of the 'from' cluster (all of the source data) are copied into the first 5 inputs of the 'to' Cluster (with 3 neurons receiving no input).

Definition at line 56 of file copylinker.h.

Constructor & Destructor Documentation

CopyLinker ( Cluster from,
Cluster to,
QString  name = "unnamed" 
)

Constructor.

Definition at line 24 of file copylinker.cpp.

CopyLinker ( ConfigurationParameters params,
QString  prefix 
)

Constructor.

Definition at line 28 of file copylinker.cpp.

~CopyLinker ( )
virtual

Destructor.

Definition at line 32 of file copylinker.cpp.

Member Function Documentation

void randomize ( double  ,
double   
)
inlinevirtual

Randomize (i.e.

do nothing !!)

Implements Linker.

Definition at line 69 of file copylinker.h.

void save ( ConfigurationParameters params,
QString  prefix 
)
virtual

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

This saves the name property, remember to call this in child classes

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

Reimplemented from Linker.

Definition at line 48 of file copylinker.cpp.

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

unsigned int size ( ) const
virtual

Returns the number of neurons connected.

Implements Linker.

Definition at line 44 of file copylinker.cpp.

References Linker::fromVector(), and Linker::toVector().

void update ( )
virtual

Update the linker.

Implements Updatable.

Definition at line 35 of file copylinker.cpp.

References DoubleVector::copyValues(), Linker::fromVector(), Cluster::resetInputs(), Linker::to(), and Linker::toVector().


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