Neuroph

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

The Connection class represents weighted connection to another neuron.

See Also:
Weight, Neuron, Serialized Form

Field Summary
protected  Neuron connectedNeuron
          Connected neuron
private static long serialVersionUID
          The class fingerprint that is set to indicate serialization compatibility with a previous version of the class
protected  Weight weight
          Weight for this connection
 
Constructor Summary
Connection(Neuron connectTo)
          Creates new connection to specified neuron with random weight
Connection(Neuron connectTo, double weightVal)
          Creates new connection to specified neuron with specified weight value
Connection(Neuron from, Neuron connectTo)
          Creates new connection between specified neurons with random weight value
Connection(Neuron connectTo, Weight weight)
          Creates new connection to specified neuron with specified weight object
 
Method Summary
 Neuron getConnectedNeuron()
          Returns the connectedNeuron neuron
 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 conection weight object
 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

serialVersionUID

private static final long serialVersionUID
The class fingerprint that is set to indicate serialization compatibility with a previous version of the class

See Also:
Constant Field Values

connectedNeuron

protected Neuron connectedNeuron
Connected neuron


weight

protected Weight weight
Weight for this connection

Constructor Detail

Connection

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

Parameters:
connectTo - neuron to connect to

Connection

public Connection(Neuron connectTo,
                  Weight weight)
Creates 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 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 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 conection weight object

Returns:
conection weight

getConnectedNeuron

public Neuron getConnectedNeuron()
Returns the connectedNeuron neuron

Returns:
connectedNeuron neuron

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

Neuroph