Abstract Linker Class. More...

Inheritance diagram for Linker:

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.
 
- 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.
 
virtual void update ()=0
 Update the object.
 
- 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 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)
 

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.
 

Additional Inherited Members

- Public Types inherited from ParameterSettableInConstructor
enum  Property
 
- 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
 
- Static Protected Member Functions inherited from ParameterSettableInConstructor
static Descriptor addTypeDescription (QString type, QString shortHelp, QString longHelp=QString(""))
 
static void setGraphicalEditor (QString type)
 

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
inlineprotected

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 MatrixLinker, CopyLinker, DotLinker, and NormLinker.

Definition at line 58 of file linker.cpp.

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

Referenced by CopyLinker::save(), MatrixLinker::save(), and 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
inlineprotected

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: