CopyLinker Class Reference

CopyLinker Class. More...

Inheritance diagram for CopyLinker:

List of all members.

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.

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   
) [inline, virtual]

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 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: