#include <Link.h>
Collaboration diagram for Link:
Public Member Functions | |
Link (Neuron *to, Neuron *from) | |
Creates a link between two neurons. | |
Link (Neuron *to, Neuron *from, real weight) | |
Creates a link between two neurons. | |
virtual | ~Link () |
Destroys the link. | |
Neuron * | getSource () const |
Pointer to the source neuron. | |
Neuron * | getDestination () const |
Pointer to the destination neuron. | |
real | getWeight () const |
Returns the weight of the link. | |
void | setWeight (real weight) |
Sets the weight of the link. | |
void | setDeltaWeight (real delta) |
Sets the change in weight of the link The actual change is made only when updateWeight is called. | |
void | updateWeight () |
Updates the weight of the link. | |
bool | isEqualTo (Link *l) |
Finds if two links are equivalent. | |
real | getLastDeltaWeight () |
Get the current delta. |
A connection has a source, destination and a weight. The source's output is taken as input by the destination
|
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.
|
|
Get the current delta. If updateWeight was called, this will be zero. Otherwise the result will be last value set by setDeltaWeight |
|
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.
|