Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

annie::Link Class Reference

#include <Link.h>

List of all members.

Public Methods

 Link (Neuron *to, Neuron *from)
 Link (Neuron *to, Neuron *from, real weight)
virtual ~Link ()
NeurongetSource ()
 Pointer to the source neuron. More...

NeurongetDestination ()
 Pointer to the destination neuron. More...

real getWeight ()
 Returns the weight of the link. More...

void setWeight (real weight)
 Sets the weight of the link. More...

void setDeltaWeight (real delta)
void updateWeight ()
bool isEqualTo (Link *l)
real getLastDeltaWeight ()

Private Attributes

Neuron_from
 The source neuron. More...

Neuron_to
 The destination neuron. More...

real _weight
 The weight of the connection. More...

real _deltaWeight
real _lastDeltaWeight


Detailed Description

Abstraction of a connection between two neurons. A connection has a source, destination and a weight. The source's output is taken as input by the destination


Constructor & Destructor Documentation

annie::Link::Link Neuron   to,
Neuron   from
 

Creates a link between two neurons. Weight assigned is a random value between -1 and +1

Parameters:
to  The destination neuron
from  The source neuron

annie::Link::Link Neuron   to,
Neuron   from,
real    weight
 

Creates a link between two neurons.

Parameters:
to  The destination neuron
from  The source neuron
weight  The weight of the connection

virtual annie::Link::~Link   [virtual]
 

Destroys the link. When doing so, removes the link from the _outputLinks of the source neuron and the _inputLinks of the destination neuron


Member Function Documentation

Neuron* annie::Link::getDestination  
 

Pointer to the destination neuron.

real annie::Link::getLastDeltaWeight  
 

Neuron* annie::Link::getSource  
 

Pointer to the source neuron.

real annie::Link::getWeight  
 

Returns the weight of the link.

bool annie::Link::isEqualTo Link *    l
 

Finds if two links are equivalent. Two links are considered equivalent if they are between the same two neurons, irrespective of the weight

Returns:
true if equivalent, false if not

void annie::Link::setDeltaWeight real    delta
 

Sets the change in weight of the link The actual change is made only when updateWeight is called

See also:
updateWeight

void annie::Link::setWeight real    weight
 

Sets the weight of the link.

void annie::Link::updateWeight  
 

Updates the weight of the link. New weight = old weight + value set by setDeltaWeight Then it resets the change in weight so successive calls to updateWeight have no adverse effect.

See also:
setDeltaWeight


Member Data Documentation

real annie::Link::_deltaWeight [private]
 

The change in weight to be made. Set this using setDeltaWeight() and then when you've set all weight changes then update the links using updateWeight()

See also:
setDeltaWeight , updateWeight

Neuron* annie::Link::_from [private]
 

The source neuron.

real annie::Link::_lastDeltaWeight [private]
 

Neuron* annie::Link::_to [private]
 

The destination neuron.

real annie::Link::_weight [private]
 

The weight of the connection.


The documentation for this class was generated from the following file:
Generated on Wed Apr 23 10:42:36 2003 for BioFilter by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002