public class Link
extends java.lang.Object
Link of a neuron
Modifier and Type | Field and Description |
---|---|
protected boolean |
broken
Link state
|
protected INeuron |
origin
Origin neuron
|
protected INeuron |
target
Target neuron
|
protected double |
weight
Weight value
|
protected static <any> |
XML
Marshal/Unmarshal weight and state of the link
|
Constructor and Description |
---|
Link()
Empty constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Link other)
Checks if this link is equal to another
|
INeuron |
getOrigin()
Returns the origin neuron of the link, used to obtain its output value
|
INeuron |
getTarget()
Returns the target neuron of the link
|
double |
getWeight()
Returns the weight associated to this link, used to obtain the output value of the destiny neuron
|
int |
hashCode()
Returns an integer number that identifies the link
|
boolean |
isBroken()
Returns a boolean indicating if the link is or not broken
|
void |
setBroken(boolean broken)
Sets a boolean indicating if the link is or not broken
|
void |
setOrigin(INeuron origin)
Sets the origin neuron of the link
|
void |
setTarget(INeuron target)
Sets the target neuron of the link
|
void |
setWeight(double weight)
Sets the weight associated to this link
|
protected static final <any> XML
Marshal/Unmarshal weight and state of the link
protected INeuron origin
protected INeuron target
protected double weight
protected boolean broken
public INeuron getOrigin()
Returns the origin neuron of the link, used to obtain its output value
public void setOrigin(INeuron origin)
Sets the origin neuron of the link
origin
- New origin neuronpublic INeuron getTarget()
Returns the target neuron of the link
public void setTarget(INeuron target)
Sets the target neuron of the link
target
- New target neuronpublic double getWeight()
Returns the weight associated to this link, used to obtain the output value of the destiny neuron
public void setWeight(double weight)
Sets the weight associated to this link
weight
- New weight valuepublic boolean isBroken()
Returns a boolean indicating if the link is or not broken
public void setBroken(boolean broken)
Sets a boolean indicating if the link is or not broken
broken
- New link statepublic boolean equals(Link other)
Checks if this link is equal to another
other
- Other link to comparepublic int hashCode()
Returns an integer number that identifies the link
hashCode
in class java.lang.Object