All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class gerken.vehicles.ExcitatoryConnection

java.lang.Object
   |
   +----gerken.vehicles.NetworkConnection
           |
           +----gerken.vehicles.ExcitatoryConnection

public class ExcitatoryConnection
extends NetworkConnection

An ExcitatoryConnection is a connection that adds its weight (an integer value) to the accumulating input of its to node, but only if its from node fired during the previous step.

This software is provided on an as-is basis and is copyright Chris Gerken. The only rights granted to you are to enjoy and learn from this software.


Constructor Index

 o ExcitatoryConnection(NetworkNode, NetworkNode)

Return an ExcitatoryConnection that connects node f to node t with weight 1.

 o ExcitatoryConnection(NetworkNode, NetworkNode, int)

Return an ExcitatoryConnection that connects node f to node t with weight w.

Method Index

 o getWeight()

Return the connection's weight.

 o setWeight(int)

Set the connection's weight.

 o updateToNode()

Check to see if the from node has fired.

Constructors

 o ExcitatoryConnection
 public ExcitatoryConnection(NetworkNode f,
                             NetworkNode t)

Return an ExcitatoryConnection that connects node f to node t with weight 1.

Parameters:
f - gerken.vehicles.VehicleNetworkNode
t - gerken.vehicles.VehicleNetworkNode
 o ExcitatoryConnection
 public ExcitatoryConnection(NetworkNode f,
                             NetworkNode t,
                             int w)

Return an ExcitatoryConnection that connects node f to node t with weight w.

Parameters:
f - gerken.vehicles.VehicleNetworkNode
t - gerken.vehicles.VehicleNetworkNode
w - int

Methods

 o getWeight
 public int getWeight()

Return the connection's weight. This value is added to the "to" node's input when the "from" node fires.

Parameters:
w - int
 o setWeight
 public void setWeight(int w)

Set the connection's weight. This value is added to the "to" node's input when the "from" node fires.

Parameters:
w - int
 o updateToNode
 public void updateToNode()

Check to see if the from node has fired. If it has, add the connection's weight to the input total for the to node.

Overrides:
updateToNode in class NetworkConnection

All Packages  Class Hierarchy  This Package  Previous  Next  Index