org.neuroph.core
Class Connection

java.lang.Object
  extended by org.neuroph.core.Connection
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
DelayedConnection

public class Connection
extends java.lang.Object
implements java.io.Serializable

Weighted connection to another neuron.

Author:
Zoran Sevarac
See Also:
Weight, Neuron, Serialized Form

Field Summary
protected  Neuron connectedNeuron
          Connected neuron
protected  Weight weight
          Weight for this connection
 
Constructor Summary
Connection(Neuron connectTo)
          Creates a new connection to specified neuron with random weight
Connection(Neuron connectTo, double weightVal)
          Creates a new connection to specified neuron with specified weight value
Connection(Neuron from, Neuron connectTo)
          Creates a new connection between specified neurons with random weight value
Connection(Neuron connectTo, Weight weight)
          Creates a new connection to specified neuron with specified weight object
 
Method Summary
 Neuron getConnectedNeuron()
          Returns the connected neuron of this connection
 double getInput()
          Returns input received through this connection - the activation that comes from the output of the cell on the other end of connection
 Weight getWeight()
          Returns weight for this connection
 double getWeightedInput()
          Returns the weighted input received through this connection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

connectedNeuron

protected Neuron connectedNeuron
Connected neuron


weight

protected Weight weight
Weight for this connection

Constructor Detail

Connection

public Connection(Neuron connectTo)
Creates a new connection to specified neuron with random weight

Parameters:
connectTo - neuron to connect to

Connection

public Connection(Neuron connectTo,
                  Weight weight)
Creates a new connection to specified neuron with specified weight object

Parameters:
connectTo - neuron to connect to
weight - weight for this connection

Connection

public Connection(Neuron connectTo,
                  double weightVal)
Creates a new connection to specified neuron with specified weight value

Parameters:
connectTo - neuron to connect to
weightVal - weight value for this connection

Connection

public Connection(Neuron from,
                  Neuron connectTo)
Creates a new connection between specified neurons with random weight value

Parameters:
from - neron to connect
connectTo - neuron to connect to
Method Detail

getWeight

public Weight getWeight()
Returns weight for this connection

Returns:
weight for this connection

getConnectedNeuron

public Neuron getConnectedNeuron()
Returns the connected neuron of this connection

Returns:
connected neuron of this connection

getInput

public double getInput()
Returns input received through this connection - the activation that comes from the output of the cell on the other end of connection

Returns:
input received through this connection

getWeightedInput

public double getWeightedInput()
Returns the weighted input received through this connection

Returns:
weighted input received through this connection