#include <Link.h>
Public Methods | |
| Link (Neuron *to, Neuron *from) | |
| Link (Neuron *to, Neuron *from, real weight) | |
| virtual | ~Link () |
| Neuron * | getSource () |
| Pointer to the source neuron. More... | |
| Neuron * | getDestination () |
| 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 |
|
||||||||||||
|
Creates a link between two neurons. Weight assigned is a random value between -1 and +1
|
|
||||||||||||||||
|
Creates a link between two neurons.
|
|
|
Destroys the link. When doing so, removes the link from the _outputLinks of the source neuron and the _inputLinks of the destination neuron |
|
|
Pointer to the destination neuron.
|
|
|
|
|
|
Pointer to the source neuron.
|
|
|
Returns the weight of the link.
|
|
|
Finds if two links are equivalent. Two links are considered equivalent if they are between the same two neurons, irrespective of the weight
|
|
|
Sets the change in weight of the link The actual change is made only when updateWeight is called
|
|
|
Sets the weight of the link.
|
|
|
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.
|
|
|
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()
|
|
|
The source neuron.
|
|
|
|
|
|
The destination neuron.
|
|
|
The weight of the connection.
|
1.2.14 written by Dimitri van Heesch,
© 1997-2002