Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Connection Class Reference

A weighted connection between two Neuron neurons. More...

#include <connection.h>

List of all members.

Public Methods

 Connection (const Neuron *source=NULL, const Neuron *target=NULL, double weight=0)
double weight () const
void setWeight (double w)
void operator= (double w)
void init (double r=0.0)
const Neuronsource () const
Neuronsource ()
const Neurontarget () const
Neurontarget ()
void setSource (const Neuron *newSource)
void setTarget (const Neuron *newTarget)
void cut ()
virtual double transfer ()
virtual void copy (const Connection &o)
virtual Connection * clone () const
virtual void check (int netSize) const


Detailed Description

A weighted connection between two Neuron neurons.

Owner of the connection is always the target neuron, and the connection points to the source neuron.

Definition at line 50 of file connection.h.


Constructor & Destructor Documentation

Connection const Neuron   source = NULL,
const Neuron   target = NULL,
double    weight = 0
 

Standard constructor.

Parameters:
sID  Neuron ID of the source neuron.
w  Weight of the connection.

Definition at line 42 of file connection.cc.

References weight().

Referenced by clone().


Member Function Documentation

void check int    netSize const [virtual]
 

Implementation for Object.

Definition at line 78 of file connection.cc.

Referenced by Neuron::check(), and BiNode::check().

virtual Connection* clone   const [inline, virtual]
 

Implementation for Object.

Definition at line 110 of file connection.h.

References Connection().

void copy const Connection &    o [virtual]
 

Standard deep copy operator.

Definition at line 67 of file connection.cc.

References weight().

Referenced by Neuron::copy().

void cut   [inline]
 

Cuts both source and target references.

Definition at line 95 of file connection.h.

void init double    r = 0.0
 

Initializes the weight randomly to range (-r,r).

Definition at line 57 of file connection.cc.

Referenced by Neuron::init().

void operator= double    w [inline]
 

Sets the weight of the connection.

Definition at line 71 of file connection.h.

void setSource const Neuron   newSource [inline]
 

Reconnects to another source neuron.

Definition at line 89 of file connection.h.

void setTarget const Neuron   newTarget [inline]
 

Reconnects to another target neuron.

Definition at line 92 of file connection.h.

void setWeight double    w [inline]
 

Sets the weight of the connection.

Definition at line 68 of file connection.h.

Referenced by RPropTrainer::updateWeights().

Neuron& source   [inline]
 

Returns the source neuron of the connection.

Definition at line 80 of file connection.h.

const Neuron& source   const [inline]
 

Returns the source neuron of the connection.

Definition at line 77 of file connection.h.

Referenced by BiNode::disconnectFrom(), ANNetwork::drawEPS(), and Neuron::transfer().

Neuron& target   [inline]
 

Returns the target neuron of the connection.

Definition at line 86 of file connection.h.

const Neuron& target   const [inline]
 

Returns the target neuron of the connection.

Definition at line 83 of file connection.h.

double transfer   [virtual]
 

Transfers a signal through this connection.

Returns:
Output value of the connection.

Definition at line 62 of file connection.cc.

References Neuron::output().

double weight   const [inline]
 

Returns the weight of the connection.

Definition at line 65 of file connection.h.

Referenced by Neuron::bias(), Connection(), copy(), Neuron::transfer(), and RPropTrainer::updateWeights().


The documentation for this class was generated from the following files:
Generated on Thu Feb 10 20:06:45 2005 for Inanna by doxygen1.2.18