|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.joone.structure.Connection
public class Connection
A connection between two nodes..
| Field Summary | |
|---|---|
protected double |
delta
The accumulated delta of the weight. |
protected boolean |
fixed
True if this is a fixed connection |
protected Node |
node
The node from which this connection originates |
protected double |
weight
The weight of this connection |
| Constructor Summary | |
|---|---|
Connection(Node node,
double weight,
boolean fixed)
Create a new connection |
|
| Method Summary | |
|---|---|
double |
getDelta()
Retrieve the current delta |
Node |
getNode()
Retrieve the node |
double |
getOutputValue(int pattern)
Retrieve the output value of this connection. |
double |
getWeight()
Retrieve the weight |
boolean |
isFixed()
See if this is a fixed weight connection |
void |
setDelta(double delta)
Set the delta |
void |
setWeight(double weight)
Set the weight to a new value unless it is fixed |
void |
updateDelta(double increment)
Add the given increment amount to the delta |
void |
updateWeight()
Update the weight - if it is not fixed - by adding the internal delta to it and also resets that delta to zero afterwards. |
void |
updateWeight(double delta)
Update the weight - if it is not fixed - by adding the given delta to it |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Node node
protected double weight
protected double delta
protected boolean fixed
| Constructor Detail |
|---|
public Connection(Node node,
double weight,
boolean fixed)
node - node from which this linksweight - weight attached to the nodefixed - if true, then this weight is fixed and can not be changed| Method Detail |
|---|
public Node getNode()
public double getWeight()
public double getDelta()
public boolean isFixed()
public double getOutputValue(int pattern)
pattern - pattern numberpublic void setWeight(double weight)
public void updateWeight(double delta)
public void updateWeight()
public void setDelta(double delta)
public void updateDelta(double increment)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||