Abstract Linker Class. More...

Inheritance diagram for Linker:

List of all members.

Public Member Functions

 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.
virtual void randomize (double min, double max)=0
 Randomize the parameters of the Linker
The parameters randomized by this method will be specified by sub-classes.
virtual void save (ConfigurationParameters &params, QString prefix)
 Save the actual status of parameters into the ConfigurationParameters object passed.
virtual unsigned int size () const =0
 Returns the 'size' of the linker
The actual means of 'size' will be specified by sub-classes that implementes concrete linkers.
Clusterto () const
 Return the Cluster to.

Static Public Member Functions

static void describe (QString type)
 Add to Factory::typeDescriptions() the descriptions of all parameters and subgroups.

Protected Member Functions

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.

Detailed Description

Abstract Linker Class.

This define the common interface among Linkers

Definition at line 38 of file linker.h.


Constructor & Destructor Documentation

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

Construct.

Definition at line 25 of file linker.cpp.

References Linker::from(), Cluster::getDelegateFor(), and Linker::to().

Linker ( ConfigurationParameters params,
QString  prefix 
)

Member Function Documentation

void configureFromVector ( QString  vectorName) [inline]

Configure on which state vector of 'from' Cluster this Linker is attached to.

Parameters:
vectorNameis the name assigned to the state vector
Warning:
it raise an exception is the vectorName does not exists

Definition at line 56 of file linker.h.

void configureToVector ( QString  vectorName) [inline]

Configure on which state vector of 'to' Cluster this Linker is attached to.

Parameters:
vectorNameis the name assigned to the state vector
Warning:
it raise an exception is the vectorName does not exists

Definition at line 64 of file linker.h.

DoubleVector& fromVector ( ) const [inline, protected]

Return a reference to the DoubleVector of 'from' on which this is attached to.

Definition at line 89 of file linker.h.

Referenced by CopyLinker::size(), NormLinker::update(), DotLinker::update(), and CopyLinker::update().

virtual void randomize ( double  min,
double  max 
) [pure virtual]

Randomize the parameters of the Linker
The parameters randomized by this method will be specified by sub-classes.

Implemented in CopyLinker, and MatrixLinker.

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 Updatable.

Reimplemented in CopyLinker, DotLinker, MatrixLinker, and NormLinker.

Definition at line 58 of file linker.cpp.

References ConfigurationParameters::createParameter(), and ConfigurationParameters::startObjectParameters().

Referenced by NeuralNet::save().

virtual unsigned int size ( ) const [pure virtual]

Returns the 'size' of the linker
The actual means of 'size' will be specified by sub-classes that implementes concrete linkers.

Implemented in CopyLinker, and MatrixLinker.

DoubleVector& toVector ( ) const [inline, protected]

Return a reference to the DoubleVector of 'to' on which this is attached to.

Definition at line 93 of file linker.h.

Referenced by CopyLinker::size(), NormLinker::update(), DotLinker::update(), and CopyLinker::update().


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