public class MultiLink extends Link implements Storable
activationFn, name, NO_ID, weight| Constructor and Description |
|---|
MultiLink()
Creates an empty multi link.
|
MultiLink(Link baseLink)
Creates a link based on another link.
|
MultiLink(Link baseLink,
Neuron source,
Neuron sink,
double weight)
Creates a new link from source to sink with the given weight.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addGradient(double value)
Adds a value to the gradient.
|
void |
addToWeight(double deltaWeight)
Adds the given value to the weight of the base link.
|
MultiLink |
clone()
Returns a semi-deep copy of this object.
|
void |
fromXML(org.jdom2.Element element,
NeuralNet net)
Reads attributes from XML tree.
|
double |
getAccu()
Returns the accu of the base link.
|
Link |
getBaseLink()
Returns the base link of this multi link.
|
double |
getGradient()
Returns the gradient of the base link.
|
double |
getLastGradient()
Returns the last gradient of the base link.
|
java.lang.String |
getName()
Returns the name of the base link.
|
double |
getWeight()
Returns the weight of the base link.
|
void |
propagate()
Propagates the output of the given neuron over the link
The weight of this link is the weight of the base link.
|
void |
randomize()
Sets the base link weight to a random value.
|
void |
randomize(double min,
double max)
Sets the base link weight to a random value in [min, max).
|
void |
reset()
Resets this link and the base link.
|
void |
setAccu(double value)
Sets the accu of the base link.
|
void |
setGradient(double gradient)
Sets the gradient of the base link.
|
void |
setLastGradient(double lastGradient)
Remembers the last gradient of the base link.
|
void |
setWeight(double weight)
Sets the weight of the base link.
|
org.jdom2.Element |
toXML(org.jdom2.Element element)
Writes attributes to XML tree.
|
clearSink, clearSource, disconnect, getOtherNeuron, getSink, getSource, getValue, isDangling, isDirected, isInputOf, isOutputOf, replaceFrom, replaceNeuron, setDirected, setSink, setSource, setValue, toStringcalculate, fromXML, getActivationFn, getID, getUniqueID, isTrainable, setActivationFn, setID, setName, setTrainablepublic MultiLink()
public MultiLink(Link baseLink)
baseLink - the base linkpublic MultiLink clone()
public java.lang.String getName()
public double getGradient()
getGradient in class BrainPartpublic void setGradient(double gradient)
setGradient in class BrainPartgradient - some gradient valuepublic void addGradient(double value)
addGradient in class BrainPartvalue - a valuepublic double getLastGradient()
getLastGradient in class BrainPartpublic void setLastGradient(double lastGradient)
setLastGradient in class BrainPartlastGradient - the last gradient valuepublic double getAccu()
public void setAccu(double value)
public Link getBaseLink()
public void randomize()
public void randomize(double min,
double max)
public void propagate()
public double getWeight()
public void setWeight(double weight)
public void addToWeight(double deltaWeight)
addToWeight in class BrainPartdeltaWeight - the value to be addedpublic org.jdom2.Element toXML(org.jdom2.Element element)