org.neuroph.core
Class Connection
- java.lang.Object
-
- org.neuroph.core.Connection
-
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- DelayedConnection
public class Connection extends java.lang.Object implements java.io.SerializableWeighted connection to another neuron.- See Also:
Weight,Neuron, Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description Connection(Neuron fromNeuron, Neuron toNeuron)Creates a new connection between specified neurons with random weightConnection(Neuron fromNeuron, Neuron toNeuron, double weightVal)Creates a new connection to specified neuron with specified weight valueConnection(Neuron fromNeuron, Neuron toNeuron, Weight weight)Creates a new connection to specified neuron with specified weight object
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.Objectclone()booleanequals(java.lang.Object obj)NeurongetFromNeuron()Gets from neuron for this connectiondoublegetInput()Returns input received through this connection - the activation that comes from the output of the cell on the other end of connection Todo: make this final and solve delayed neuron connection in a different wayNeurongetToNeuron()Gets to neuron for this connectionWeightgetWeight()Returns weight for this connectiondoublegetWeightedInput()Returns the weighted input received through this connectioninthashCode()voidsetWeight(Weight weight)Set the weight of the connection.java.lang.StringtoString()
-
-
-
Constructor Detail
-
Connection
public Connection(Neuron fromNeuron, Neuron toNeuron)
Creates a new connection between specified neurons with random weight- Parameters:
fromNeuron- neuron to connect fromtoNeuron- neuron to connect to
-
Connection
public Connection(Neuron fromNeuron, Neuron toNeuron, Weight weight)
Creates a new connection to specified neuron with specified weight object- Parameters:
fromNeuron- neuron to connect fromtoNeuron- neuron to connect toweight- weight for this connection
-
-
Method Detail
-
getWeight
public final Weight getWeight()
Returns weight for this connection- Returns:
- weight for this connection
-
setWeight
public final void setWeight(Weight weight)
Set the weight of the connection.- Parameters:
weight- The new weight of the 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 Todo: make this final and solve delayed neuron connection in a different way- Returns:
- input received through this connection
-
getWeightedInput
public final double getWeightedInput()
Returns the weighted input received through this connection- Returns:
- weighted input received through this connection
-
getFromNeuron
public final Neuron getFromNeuron()
Gets from neuron for this connection- Returns:
- from neuron for this connection
-
getToNeuron
public final Neuron getToNeuron()
Gets to neuron for this connection- Returns:
- neuron to set as to neuron
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException- Overrides:
clonein classjava.lang.Object- Throws:
java.lang.CloneNotSupportedException
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-
DMelt 3.0 © DataMelt by jWork.ORG