SparseMatrixLinker Class Reference

SparseMatrixLinker Class extend MatrixLinker for allow non-full connection between Clusters. More...

Inheritance diagram for SparseMatrixLinker:

Inheritance graph
[legend]
Collaboration diagram for SparseMatrixLinker:

Collaboration graph
[legend]
List of all members.

Constructors

 SparseMatrixLinker (Cluster *from, Cluster *to, const char *name="unnamed")
 SparseMatrixLinker (Real prob, Cluster *from, Cluster *to, const char *name="unnamed")
 SparseMatrixLinker (Cluster *from, Cluster *to, Real prob, bool zeroDiagonal=false, bool symmetricMask=false, const char *name="unnamed")
 SparseMatrixLinker (PropertySettings &prop)
virtual ~SparseMatrixLinker ()

Interface

virtual void setWeight (u_int from, u_int to, Real weight)
virtual void randomize (Real min, Real max)
void update ()
void connect (u_int from, u_int to)
void connectRandom (Real prob)
void connectAll ()
void disconnect (u_int from, u_int to)
void disconnectRandom (Real prob)
void disconnectAll ()
MatrixData< bool > & getMask ()
MatrixData< bool > & mask ()
Variant maskP ()
void setMask (const MatrixData< bool > &mask)
bool setMask (const Variant &v)
virtual SparseMatrixLinkerclone () const

Detailed Description

Every connection is weighted, and the weight is memorized into a weight-matrix Details ...


Constructor & Destructor Documentation

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

Connect clusters with complete connections

SparseMatrixLinker ( Real  prob,
Cluster from,
Cluster to,
const char *  name = "unnamed" 
)

Connect neurons of Clusters with a random connections with the passed probability.

SparseMatrixLinker ( Cluster from,
Cluster to,
Real  prob,
bool  zeroDiagonal = false,
bool  symmetricMask = false,
const char *  name = "unnamed" 
)

Connect neurons of Clusters with a random connections with the passed probability.
With this contructor you must also specify whether the diagonal of the matrix is made of zeros and whether the matrix is symmetrical

Warning:
You can use this constructor only with square matrices, otherwise it will generate a memory error!!!

SparseMatrixLinker ( PropertySettings prop  ) 

Construct by PropertySettings

virtual ~SparseMatrixLinker (  )  [virtual]

Destructor


Member Function Documentation

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

Set the weight of the connection specified

Reimplemented from MatrixLinker.

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

Randomize the weights of the SparseMatrixLinker

Reimplemented from MatrixLinker.

void update (  )  [virtual]

Performs the dot-product calculation where the non-connection are considered as zero

Implements Updatable.

void connect ( u_int  from,
u_int  to 
)

Connect two neurons

void connectRandom ( Real  prob  ) 

Connects randomly according to the given probability

void connectAll (  ) 

Connect all couples of neurons

void disconnect ( u_int  from,
u_int  to 
)

Disconnect the two neurons

void disconnectRandom ( Real  prob  ) 

Disconnects randomly according to the given probability

void disconnectAll (  ) 

Disonnect all couples of neurons

MatrixData<bool>& getMask (  )  [inline]

Get the mask

Deprecated:
use mask() instead

MatrixData<bool>& mask (  )  [inline]

Return the mask

Variant maskP (  )  [inline]

Return the mask matrix (Variant ver)

void setMask ( const MatrixData< bool > &  mask  ) 

Set the whole mask matrix

bool setMask ( const Variant v  ) 

Set the whole mask matrix (Variant ver)

virtual SparseMatrixLinker* clone (  )  const [virtual]

Clone this SparseMatrixLinker

Reimplemented from Linker.


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