CSP for Java
(JCSP) 1.0-rc4

jcsp.plugNplay
Class Fibonacci

java.lang.Object
  |
  +--jcsp.plugNplay.Fibonacci
All Implemented Interfaces:
CSProcess

public class Fibonacci
extends Object
implements CSProcess

This generates the Fibonacci sequence on its output channel.

CSProcess Diagram

External View

         ___________  
        |           | out
        | Fibonacci |------>
        |___________|
 

Internal View

         ________________________________
        |                                |
        |  ____________       _______    |
        | |            |     |       |   | out
        | | Prefix (0) |-->--| Delta2 |------>-- 
        | |____________|     |_______|   |
        |        |               |       |
        |        ^               V       |
        |  ______|_____       ___|___    |
        | |            |     |       |   |
        | | Prefix (1) |--<--| Pairs |   |
        | |____________|     |_______|   |
        |                                |
        |                      Fibonacci |
        |________________________________|
 

Description

FibonacciInt generates the sequence of Fibonacci Numbers on its output channel.

Channel Protocols

Output Channels
out java.lang.Integer The output will always be of type Integer.

Author:
P.D.Austin

Constructor Summary
Fibonacci(ChannelOutput out)
          Construct a new Fibonacci process with the output Channel out.
 
Method Summary
 void run()
          The main body of this process.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Fibonacci

public Fibonacci(ChannelOutput out)
Construct a new Fibonacci process with the output Channel out.
Parameters:
out - the output channel
Method Detail

run

public void run()
The main body of this process.
Specified by:
run in interface CSProcess

CSP for Java
(JCSP) 1.0-rc4

Submit a bug or feature to jcsp-team@ukc.ac.uk
Version 1.0-rc4 of the JCSP API Specification (Copyright 1997-2000 P.D.Austin and P.H.Welch - All Rights Reserved)
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.