public class Connection extends Object implements Serializable
Weight
,
Neuron
,
Serialized FormModifier and Type | Field and Description |
---|---|
protected Neuron |
fromNeuron
From neuron for this connection (source neuron).
|
protected Neuron |
toNeuron
To neuron for this connection (target, destination neuron)
This connection is input connection for to neuron.
|
protected Weight |
weight
Weight for this connection
|
Constructor and Description |
---|
Connection(Neuron fromNeuron,
Neuron toNeuron)
Creates a new connection between specified neurons with random weight
|
Connection(Neuron fromNeuron,
Neuron toNeuron,
double weightVal)
Creates a new connection to specified neuron with specified weight value
|
Connection(Neuron fromNeuron,
Neuron toNeuron,
Weight weight)
Creates a new connection to specified neuron with specified weight object
|
Modifier and Type | Method and Description |
---|---|
Object |
clone() |
boolean |
equals(Object obj) |
Neuron |
getFromNeuron()
Gets from neuron for 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
|
Neuron |
getToNeuron()
Gets to neuron for this connection
|
Weight |
getWeight()
Returns weight for this connection
|
double |
getWeightedInput()
Returns the weighted input received through this connection
|
int |
hashCode() |
void |
setWeight(Weight weight)
Set the weight of the connection.
|
String |
toString() |
protected Neuron fromNeuron
protected Neuron toNeuron
protected Weight weight
public Connection(Neuron fromNeuron, Neuron toNeuron)
fromNeuron
- neuron to connect fromtoNeuron
- neuron to connect topublic Connection(Neuron fromNeuron, Neuron toNeuron, Weight weight)
fromNeuron
- neuron to connect fromtoNeuron
- neuron to connect toweight
- weight for this connectionpublic Weight getWeight()
public void setWeight(Weight weight)
weight
- The new weight of the connection.public double getInput()
public double getWeightedInput()
public Neuron getFromNeuron()
public Neuron getToNeuron()
public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
Copyright © 2017 Neuroph Project. All rights reserved.