MatrixLinker Class define a full connection between two cluster. More...
Public Member Functions | |
MatrixLinker (Cluster *from, Cluster *to, QString name="unnamed") | |
Connect clusters with a complete connections By default it create a fully-connected matrix, use one of the following methods for choose a different way: connect, connectRandom, disconnect, disconnectRandom. More... | |
MatrixLinker (ConfigurationParameters ¶ms, QString prefix) | |
Constructor. More... | |
virtual | ~MatrixLinker () |
Destructor. More... | |
unsigned int | cols () |
Get the number of cols. More... | |
DoubleMatrix & | matrix () |
Return the weight matrix. More... | |
const DoubleMatrix & | matrix () const |
const version of matrix() method More... | |
virtual void | randomize (double min, double max) |
Randomize the weights of the MatrixLinker. More... | |
unsigned int | rows () |
Get the number of rows. More... | |
virtual void | save (ConfigurationParameters ¶ms, QString prefix) |
Save the actual status of parameters into the ConfigurationParameters object passed. More... | |
virtual void | setWeight (unsigned int from, unsigned int to, double weight) |
Set the weight of the connection specified. More... | |
unsigned int | size () const |
Returns the total number of the links: rows*cols. More... | |
virtual double | weight (unsigned int from, unsigned int to) |
Get the weight of the connection specified. More... | |
Public Member Functions inherited from Linker | |
Linker (Cluster *from, Cluster *to, QString name="unnamed") | |
Construct. More... | |
Linker (ConfigurationParameters ¶ms, QString prefix) | |
Constructor. More... | |
void | configureFromVector (QString vectorName) |
Configure on which state vector of 'from' Cluster this Linker is attached to. More... | |
void | configureToVector (QString vectorName) |
Configure on which state vector of 'to' Cluster this Linker is attached to. More... | |
Cluster * | from () const |
Return the Cluster From. More... | |
Cluster * | to () const |
Return the Cluster to. More... | |
Public Member Functions inherited from Updatable | |
Updatable (QString name="unnamed") | |
Constructor. More... | |
Updatable (ConfigurationParameters ¶ms, QString prefix) | |
Constructor. More... | |
virtual | ~Updatable () |
Destructor. More... | |
QString | name () const |
Return its name. More... | |
void | setName (QString newname) |
Set the name of Updatable. More... | |
virtual void | update ()=0 |
Update the object. More... | |
Public Member Functions inherited from ParameterSettableInConstructor | |
ParameterSettableInConstructor (ConfigurationParameters &, QString) | |
Public Member Functions inherited from ParameterSettable | |
void | addObserver (RuntimeParameterObserver *obs) |
T | getRuntimeParameter (QString paramName) |
virtual ParameterSettableUI * | getUIManager () |
virtual void | postConfigureInitialization () |
void | removeObserver (RuntimeParameterObserver *obs) |
void | setRuntimeParameter (QString paramName, T newvalue) |
QString | typeName () const |
Additional Inherited Members | |
Public Types inherited from ParameterSettable | |
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. More... | |
Static Public Member Functions inherited from Updatable | |
static void | describe (QString type) |
Add to Factory::typeDescriptions() the descriptions of all parameters and subgroups. More... | |
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) |
Public Attributes inherited from ParameterSettable | |
AllowMultiple | |
Default | |
IsList | |
IsMandatory | |
Static Public Attributes inherited from ParameterSettable | |
static const double | Infinity |
static const int | MaxInteger |
static const int | MinInteger |
Protected Member Functions inherited from Linker | |
DoubleVector & | fromVector () const |
Return a reference to the DoubleVector of 'from' on which this is attached to. More... | |
DoubleVector & | toVector () const |
Return a reference to the DoubleVector of 'to' on which this is attached to. More... | |
Protected Member Functions inherited from ParameterSettable | |
void | notifyChangesToParam (QString paramName) |
Static Protected Member Functions inherited from ParameterSettable | |
static Descriptor | addTypeDescription (QString type, QString shortHelp, QString longHelp=QString("")) |
static void | setGraphicalEditor (QString type) |
Detailed Description
MatrixLinker Class define a full connection between two cluster.
This class rapresent connections between neuron's 'from' Cluster and neuron's 'to' Cluster with a matrix. It allow only full connections among neurons.
The connections have a weight and these are stored in a matrix on which the row index refers to the neurons in the cluster 'from' and the column index refers to the neurons in the cluster 'to'.
Every connection is weighted, and the weight is memorized into a weight-matrix.
Definition at line 39 of file matrixlinker.h.
Constructor & Destructor Documentation
MatrixLinker | ( | Cluster * | from, |
Cluster * | to, | ||
QString | name = "unnamed" |
||
) |
Connect clusters with a complete connections By default it create a fully-connected matrix, use one of the following methods for choose a different way: connect, connectRandom, disconnect, disconnectRandom.
Definition at line 27 of file matrixlinker.cpp.
MatrixLinker | ( | ConfigurationParameters & | params, |
QString | prefix | ||
) |
Constructor.
Definition at line 34 of file matrixlinker.cpp.
References ConfigurationParameters::getValue(), and min().
|
virtual |
Destructor.
Definition at line 63 of file matrixlinker.cpp.
Member Function Documentation
|
inline |
Get the number of cols.
Definition at line 55 of file matrixlinker.h.
Referenced by MatrixLinker::save().
|
inline |
Return the weight matrix.
Definition at line 67 of file matrixlinker.h.
Referenced by NormLinker::update(), and DotLinker::update().
|
inline |
const version of matrix() method
Definition at line 71 of file matrixlinker.h.
|
virtual |
Randomize the weights of the MatrixLinker.
Implements Linker.
Definition at line 70 of file matrixlinker.cpp.
References RandomGenerator::getDouble(), and farsa::globalRNG.
|
inline |
Get the number of rows.
Definition at line 51 of file matrixlinker.h.
Referenced by MatrixLinker::save().
|
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
-
params the configuration parameters object on which save actual parameters prefix the prefix to use to access the object configuration parameters.
Reimplemented from Linker.
Reimplemented in DotLinker, and NormLinker.
Definition at line 86 of file matrixlinker.cpp.
References MatrixLinker::cols(), ConfigurationParameters::createParameter(), MatrixLinker::rows(), Linker::save(), and ConfigurationParameters::startObjectParameters().
Referenced by NormLinker::save(), and DotLinker::save().
|
virtual |
Set the weight of the connection specified.
Definition at line 78 of file matrixlinker.cpp.
References MatrixLinker::weight().
|
virtual |
Returns the total number of the links: rows*cols.
Implements Linker.
Definition at line 66 of file matrixlinker.cpp.
|
virtual |
Get the weight of the connection specified.
Definition at line 82 of file matrixlinker.cpp.
Referenced by MatrixLinker::setWeight().
The documentation for this class was generated from the following files:
- nnfw/include/matrixlinker.h
- nnfw/src/matrixlinker.cpp