MatrixLinker Class Reference

MatrixLinker Class define a full connection between two cluster. More...

Inheritance diagram for MatrixLinker:

Inheritance graph
[legend]
Collaboration diagram for MatrixLinker:

Collaboration graph
[legend]
List of all members.

Constructors

 MatrixLinker (Cluster *from, Cluster *to, const char *name="unnamed")
 MatrixLinker (PropertySettings &prop)
virtual ~MatrixLinker ()

Interface

u_int rows ()
u_int cols ()
u_int size () const
virtual void randomize (Real min, Real max)
virtual void setWeight (u_int from, u_int to, Real weight)
virtual Real getWeight (u_int from, u_int to)
RealMatmatrix ()
const RealMatmatrix () const
Variant matrixP ()
void setMatrix (const RealMat &mat)
bool setMatrix (const Variant &v)

Detailed Description

Motivation
This class rapresent a full-connection between neuron's 'from' Cluster and neuron's 'to' Cluster. The connections has a weight and are stored in a matrix which the rows are the neuron's 'from' and the columns the neuron's 'to'.
Description
Every connection is weighted, and the weight is memorized into a weight-matrix.
The effective computation of inputs' 'to' is done in the subclasses (DotLinker, NormLinker, etc).
Warning
From 0.7.0 release the update method will become pure-virtual.
Properties
Name Type [isVector] Access mode Description Class
typename string read-only Class's type Propertized
name string read/write name of the object Updatable
from Cluster read-only incoming Cluster Linker
to Cluster read-only outgoing Cluster Linker
weights RealMat read/write connections' weights this


Constructor & Destructor Documentation

MatrixLinker ( Cluster from,
Cluster to,
const char *  name = "unnamed" 
)

Connect clusters with a complete connections

MatrixLinker ( PropertySettings prop  ) 

Construct by PropertySettings

virtual ~MatrixLinker (  )  [virtual]

Destructor


Member Function Documentation

u_int rows (  )  [inline]

Get the number of rows

u_int cols (  )  [inline]

Get the number of cols

u_int size (  )  const [virtual]

Returns the total number of the links: rows*cols

Implements Linker.

virtual void randomize ( Real  min,
Real  max 
) [virtual]

Randomize the weights of the MatrixLinker

Implements Linker.

Reimplemented in SparseMatrixLinker.

virtual void setWeight ( u_int  from,
u_int  to,
Real  weight 
) [virtual]

Set the weight of the connection specified

Reimplemented in SparseMatrixLinker.

virtual Real getWeight ( u_int  from,
u_int  to 
) [virtual]

Get the weight of the connection specified

RealMat& matrix (  )  [inline]

Return the weight matrix

const RealMat& matrix (  )  const [inline]

const version of matrix() method

Variant matrixP (  )  [inline]

Return the weight matrix (Variant ver)

void setMatrix ( const RealMat mat  ) 

Set the whole weight matrix

bool setMatrix ( const Variant v  ) 

Set the whole weight matrix (Variant ver)


The documentation for this class was generated from the following file:
BerliOS Developer Logo Valid XHTML 1.0 Transitional Valid CSS!