All Packages Class Hierarchy This Package Previous Next Index
Class jcsp.util.buildingblocks.Integrator
java.lang.Object
|
+----jcsp.util.buildingblocks.Integrator
- public class Integrator
- extends Object
- implements CSProcess
Process Diagram
External View
____________
in | | out
-->-| Integrator |-->---
|____________|
Internal View
__________________________________________
| _______ _______ |
in | | | | | | out
-->---| Plus |------->---------| Delta |--------->---
| |_______| _______| |
| | | |
| | ____________ | |
| | | | | |
| +--<--| Prefix (0) |--<--+ |
| |____________| |
| Integrator |
|__________________________________________|
Description
The Integrator class is a process which calculates a running total of
the Numbers sent down the in Channel and outputs it down the out Channel.
This continues forever.
Channel Protocols
| Input Channels |
| in |
java.lang.Number |
The Channel can accept data from any subclass of Number.All values
will be converted to ints.
|
| Output Channels |
| out |
java.lang.Integer |
The output will always be of type Integer.
|
- Author:
- P.D.Austin
-
Integrator(ChannelInput, ChannelOutput)
- Construct a new Integrator process with the input Channel in and the
output Channel out.
-
run()
- The main body of this process.
Integrator
public Integrator(ChannelInput in,
ChannelOutput out)
- Construct a new Integrator process with the input Channel in and the
output Channel out.
- Parameters:
- in - The input Channel
- out - The output Channel
run
public void run()
- The main body of this process.
All Packages Class Hierarchy This Package Previous Next Index